'VSCODE LARAVEL XDEBUG PHP DEBUG extension - not stopping on breakpoints

I'm trying to debug a laravel app using vscode. It seems that xdebug is connecting but I'm having no luck so far with the breakpoints. I have set a few but it is not stopping as intended.

Here is my config and logs.

I start listening in vscode with F5, and then I run php artisan serve on the terminal.

php.ini ->

[XDebug]
zend_extension=C:\xampp\php\ext\php_xdebug-2.9.2-7.3-vc15-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9091
xdebug.remote_host=127.0.0.1
xdebug.remote_log=C:\xampp\xdebug.log
xdebug.idekey=VSCODE

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9091,
            "log": true
        }
    ]
}

C:\xampp\xdebug.log

[241672] Log opened at 2020-02-28 20:02:30
[241672] I: Connecting to configured address/port: 127.0.0.1:9091.
[241672] I: Connected to client. :-)
[241672] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///C:/Development/Menuu/menuu_backend_dev/artisan" language="PHP" xdebug:language_version="7.3.13" protocol_version="1.0" appid="241672" idekey="VSCODE"><engine version="2.9.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[241672] <- breakpoint_list -i 1
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>

[241672] <- breakpoint_set -i 2 -t line -f file:///c:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/Auth/LoginController.php -n 48
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="1106000001"></response>

[241672] <- breakpoint_list -i 3
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"><breakpoint type="line" filename="file:///C:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/Auth/LoginController.php" lineno="48" state="enabled" hit_count="0" hit_value="0" id="1106000001"></breakpoint></response>

[241672] <- breakpoint_set -i 4 -t line -f file:///c:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/API/Driver/UserAPIController.php -n 40
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="1106000002"></response>

[241672] <- breakpoint_list -i 5
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"><breakpoint type="line" filename="file:///C:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/API/Driver/UserAPIController.php" lineno="40" state="enabled" hit_count="0" hit_value="0" id="1106000002"></breakpoint><breakpoint type="line" filename="file:///C:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/Auth/LoginController.php" lineno="48" state="enabled" hit_count="0" hit_value="0" id="1106000001"></breakpoint></response>

[241672] <- breakpoint_list -i 6
[241672] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="6"><breakpoint type="line" filename="file:///C:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/API/Driver/UserAPIController.php" lineno="40" state="enabled" hit_count="0" hit_value="0" id="1106000002"></breakpoint><breakpoint type="line" filename="file:///C:/Development/Menuu/menuu_backend_dev/app/Http/Controllers/Auth/LoginController.php" lineno="48" state="enabled" hit_count="0" hit_value="0" id="1106000001"></breakpoint></response>

[241672] <- run -i 7


Solution 1:[1]

Place your breakpoints on lines that have code.

If you place your breakpoints on BLANK LINES it will not work, it will just skip them.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ThePrince