Closed iandunn closed 1 year ago
Hi!
skipFiles
is for skipping over files when you do a step-in operation. Commonly referred to as "Just My Code", where you typically don't want to step into framework or vendor code.
ignore
is very similar but just ignores exceptions/errors inside those files. "I don't care about exceptions inside vendor.".
Now for your request. If I understand, you would like to debug only certain "entrypoints" or better ignore some entrypoints? There is currently no configuration for this but what you could do is add some PHP code that can help you here. Although there is no what to disconnect from debugger in code there is a xdebug_connect_to_client function that can trigger a connection to debugger from code.
How you could use this is that you don't initiate a debug session from the browser (do not set the XDEBUG_SESSION cookie) but rather add a call xdebug_connect_to_client();
in such code location that will only trigger on the desired entrypoint.
Let me know if this is clear. And be sure not to commit and deploy to production :)
Maybe you could also abuse the XDEBUG_SESSION_STOP GET parameter, but I have not tried such monstrosity...
Best!
Thanks, that's helpful info. It doesn't seem too convenient, though. I switched over from PHPStorm and it was easy to do this there, so I was looking for something similar.
IMO it'd be a good feature to add, but I totally understand if there isn't a lot of demand for it.
I see. Should not be that hard to implement. Will leave this open and see if I can get to it.
Sounds good, thanks!
This is working for me, thanks!
I'd like to completely ignore any request that comes in to a specific file/URL. I've tried using
skipFiles
andignore
, but it seems like those will still handle the request, but they will skip the file when stepping through the codebase.PHP version:
8.0.28
Xdebug version:3.2.0
VS Code extension version:1.32.1
launch.json:
Xdebug php.ini config: