View Issue Details

IDProjectCategoryView StatusLast Update
0001842XdebugStep Debuggingpublic2020-09-30 13:23
Reportermatthew.hyrka Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Summary0001842: Xdebug breakpoint highlighting breaking in custom namespace
Description

When moving a Laravel controller to a custom subdirectory under /app/Http/Controllers the step debugging highlighting bar disappears.

Steps To Reproduce

VSCode Version: 1.48.2
OS Version: macOS Catalina 10.15.4 (19E266)
Steps to Reproduce:

xdebug settings:

    {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
        "xdebugSettings": {
            "max_children": 256,
            "max_data": 512,
            "max_depth": 3
        }

Create a new laravel project using version 5.7.13
Create a new controller php artisan make:controller TestController
Create a public function index() that returns 'hello world'
Create a route that points to this controller in ecompli4/routes/api.php like so:
Route::get('/test', 'TestController@index');
Put a breakpoint in the index function and call with postman. Yellow debug highlighting should appear.
Now create a subdirectory under /app/Http/Controllers called Client.
Move the TestController.php to /app/Http/Controllers/Clients. Update the namespace and use statements like so:
namespace App\Http\Controllers\Client;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
Update the route to reflect the new namespace like so:
Route::get('/test', 'Client\TestController@index');
Start the debugger and put a breakpoint in the index function.
The breakpoint should catch but without the yellow highlighting.

TagsNo tags attached.
Operating System
PHP Version7.4.0-7.4.4

Activities

derick

2020-09-07 09:09

administrator   ~0005454

I know nothing about VSCode, Laravel, or OSX, as I don't run them, or have one. When you say things like "Create a new laravel project using version 5.7.13", I've no idea how to do that. I can follow steps, but they need to be precise.

FWIW, I don't think there is a bug on the Xdebug side here at all, as it doesn't care where your code runs.

matthew.hyrka

2020-09-29 16:19

reporter   ~0005469

Hi Derrick. Thanks for looking into this. It appears that this is resolved with the latest VSCode update.

derick

2020-09-30 13:23

administrator   ~0005472

Excellent. Let me close this then.

Issue History

Date Modified Username Field Change
2020-09-04 17:06 matthew.hyrka New Issue
2020-09-07 09:09 derick Assigned To => derick
2020-09-07 09:09 derick Status new => feedback
2020-09-07 09:09 derick Note Added: 0005454
2020-09-29 16:19 matthew.hyrka Note Added: 0005469
2020-09-29 16:19 matthew.hyrka Status feedback => assigned
2020-09-30 13:23 derick Status assigned => closed
2020-09-30 13:23 derick Resolution open => no change required
2020-09-30 13:23 derick Note Added: 0005472