Vscode-php-debug: Option to disable automatic exception breakpoints, break only at explicit points

Created on 31 Aug 2016  路  11Comments  路  Source: xdebug/vscode-php-debug

Please include the ability to disable automatic breakpoints, this extension is all but useless for debugging older code without it. I have inherited an ancient application built on a terrible homemade framework that constantly throws exceptions for small things, I don't want to click continue 100+ times before I can get to my own explicit breakpoint and fix actual feature code.

If you could point me to where the automatic breakpoints are configured / set, I can fork and solve this issue myself, but my understanding of the GDBp is limited, and TypeScript is somewhat foreign, so I need some direction.

Thanks.


PHP version: 5.6.22
XDebug version: 2.4.1
Adapter version: 1.9.4

Your launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "localSourceRoot": "/Users/mitchell/dev/git",
            "serverSourceRoot": "/mnt/git/"
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9000
        }
    ]
}

Most helpful comment

Unchecking everything should disable breaking on any kind of error

image

All 11 comments

Unchecking everything should disable breaking on any kind of error

image

I am an idiot. Thanks.

Is there a way to break only on un-caught exceptions (like chrome dev tools)?

@aNickzz that is not exposed by XDebug

I definitely don't have those options under the breakpoint bar. I've restarted the app and all that, made sure the breakpoints bar was expanded, etc.

@knetworx did you run the debugger at least once? It needs to return those options to VS Code at least once

I've tried to, but I think I've got something wrong in my setup. It seems to die immediately.
screen shot 2018-04-11 at 9 17 49 pm
We have a very complex project, and I'm trying to figure out the build process so I can debug in VSCode rather than XCode, but it's not my area of expertise, so I'm fumbling through it.

Seems like a different issue / problem with your setup. Please open a new issue and include the logs in the issue template

I figured it out, I just needed to set my DYLD_LIBRARY_PATH in my launch.json, like this:

"environment": [
    {
        "name": "DYLD_LIBRARY_PATH",
        "value": "bin"
    }
],

image

XDebug breaking on exceptions that are being caught is extremely annoying and breaks good code design...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lirondu picture lirondu  路  11Comments

QwertyZW picture QwertyZW  路  9Comments

ettoredn picture ettoredn  路  12Comments

luxifer picture luxifer  路  3Comments

leslieeilsel picture leslieeilsel  路  7Comments