hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

Debugger launch configuration #25

Closed SimonCapewell closed 5 years ago

SimonCapewell commented 5 years ago

Is it possible to supply custom configuration when debugging tests from the codelens links or Test Explorer? I'd like to be able to specify skipfiles either on a per project basis or globally so I'm not landing in async framework methods

    "skipFiles": [
    "<node_internals>/**",
    "node_modules/cls-hooked/**"
]
SimonCapewell commented 5 years ago

Had a peek at the code. You can achieve this fairly simply by adding skipFiles: this.config.skipFiles to the vscode.debug.startDebugging options in attach.ts line 316

In the meantime I've hacked my local install with a custom skipfiles and all is good :-)

hbenl commented 5 years ago

I have added a config option for using your own debugger configuration, so there is no more need to hack this extension :)

SimonCapewell commented 5 years ago

Awesome! Thanks for the great extension.

darthwalsh commented 5 years ago

Thanks for adding the config option! But it feels a bit like a workaround...

Should skipping node_internals and node_modules be included in the default configuration? I'm guessing a large majority of users would be delighted not seeing the random exceptions jasmine handles :)

hbenl commented 5 years ago

@darthwalsh I didn't want to make it the default, but since using skipFiles seems quite popular with this extension, I've added the jasmineExplorer.debuggerSkipFiles config option in version 1.5.0, so you don't have to create a custom debugger configuration anymore if you just want to skip.