View Issue Details

IDProjectCategoryView StatusLast Update
0001663XdebugStep Debuggingpublic2019-06-28 19:33
Reporterjpfingst Assigned To 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.7.0rc1 
Summary0001663: Remote Visual Studio Code not stopping on breakpoints.
Description

I am using Visual Studio Code to remotely debug Laravel PHP on a local Homestead Nginx server.
Visual Studio Code is not stopping any breakpoints.
Visual Studio Code will show running threads.
Visual Studio Code will break on exceptions at which time the call stack displays and variable values can be examined.
In the xdebug log, I see breakpoint_set entries where I've confirmed the file and line numbers match where I've set breakpoints in VSC.
The xdebug log seems to indicate all is well on the server side, but I don't really know.

Additional Information

The attached xdebug log likely includes a forced exception (I put in a 1/0 after the line of code where I had set a breakpoint, to be sure this code was getting executed as expected).

vagrant@homestead:~/code/api$ php -v
PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.0rc1, Copyright (c) 2002-2019, by Derick Rethans
with blackfire v1.24.3~linux-x64-non_zts73, https://blackfire.io, by Blackfire

TagsNo tags attached.
Operating SystemUbuntu 18.04
PHP Version7.3.0-7.3.1

Activities

jpfingst

2019-05-03 19:39

reporter   ~0005014

Visual Studio Code
Version: 1.33.1 (user setup)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.1.7601

jpfingst

2019-05-03 20:03

reporter   ~0005015

If I set stop_on_entry, I am able to step through/over/into without problems.

jpfingst

2019-05-03 20:43

reporter   ~0005016

I tried adding xdebug.idekey=VSCODE, but that didn't seem to have any affect.

derick

2019-06-28 11:31

administrator   ~0005045

The log shows that you're setting breakpoints with these file names:

c:/Users/jpfingst/Documents/bit/api/app/API/V1/Controllers/DocumentPortal/CloneItem.php

But, if you look at the init packet, it shows:

fileuri="file:///home/vagrant/code/api/public/index.php"

Because you are running code in a Vagrant machine, the paths that Xdebug sees (starting with /home/vagrant/code) don't match which you can see with VS Code (starting with c:/Users/jp...bit). You need to tell VSCode to make a path mapping between these two paths. You made an attempt, but I think you just forgot the c: in front of /Users/jpginst in your launch.json. As this is not a bug, and rather an issue with VSCode configuration I am closing out this bug report.

jpfingst

2019-06-28 19:33

reporter   ~0005050

OMG! Thanks for the second set of eyes. Priceless.