xdebug / vscode-php-debug

PHP Debug Adapter for Visual Studio Code 🐞⛔
MIT License
768 stars 175 forks source link

feat: Ignore exceptions based on class name #882

Closed 8ctopus closed 1 year ago

8ctopus commented 1 year ago

Add ignore exceptions based on class name.

For some reason, mocha tests don't work on my system. It could be that it's not 100% correct, so please be understanding.

zobo commented 1 year ago

Hi!

Thanks for the PR. Exception "breakpoints" are a missing feature for some time, but due to the lack of proper UI support they were not yet implemented.

Interesting approach here, I will look at it more closely.

8ctopus commented 1 year ago

Thank you, I implemented it this way, because when running Laravel, I get tons of exceptions from within the templating engine, the cookie decryption engine and so forth... This change allows to remove the focus from what can safely be ignored.

zobo commented 1 year ago

I completely agree this is needed. I just want to be sure before adding new options to launch.json that can be hard to remove later if I decide to reimplement things differently.

zobo commented 1 year ago

Try running npm run lint

8ctopus commented 1 year ago

I ran the linter before implementing the test and didn't check afterwards. It's now fixed. All linter complaints are in parts I didn't touch.

8ctopus commented 1 year ago

Any thoughts?

zobo commented 1 year ago

Sorry about the delay, I was away. Will take a look at it again in the next days snd probably just merge.

8ctopus commented 1 year ago

Thank you for the update @zobo , I can't wait to use it.

zobo commented 1 year ago

I did some updates and fixes. Decided to rename the setting to ignoreExceptions since we already have ignore and skipFiles.

codecov[bot] commented 1 year ago

Codecov Report

Merging #882 (fe283fe) into main (75c3e1d) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #882      +/-   ##
==========================================
+ Coverage   67.57%   67.60%   +0.03%     
==========================================
  Files          12       12              
  Lines        1943     1945       +2     
  Branches      386      388       +2     
==========================================
+ Hits         1313     1315       +2     
  Misses        630      630              
Impacted Files Coverage Δ
src/phpDebug.ts 62.32% <100.00%> (+0.10%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

8ctopus commented 1 year ago

Awesome, can't wait for the merge. Thank you for looking into it @zobo

8ctopus commented 1 year ago

@zobo When can we expect the merge?

zobo commented 1 year ago

Wanted to find a better solution as new cases showed up, but can't get to it now, so I merged it now. Hope it helps. Will revisit and find a better solution.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.32.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

8ctopus commented 1 year ago

Awesome thank you.