You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there anything that indicates whether I am in run test or debug test?
I'm running tests against a vscode extension and while I can set my test vscode to inspect, usually the debugger doesn't attach until after the test has run. I could introduce a delay but I'd much rather have some kind of indicator either by environment variable or by arg passed to my launcher script that we are in debug mode vs. run mode so I can instruct my vscode extension instance to --inspect-brk instead of just --inspect. Thanks!
EDIT: Looks like this is the intended behavior, but it only works if launcherscript is not specified. I think an env var would be appropriate to pass to the run process if debug is true, like __TEST_MOCHA_ADAPTER_DEBUG=true
Start the debugging config before launching the process, so it hopefully attaches quickly, may need to increase default attach timeout.
The text was updated successfully, but these errors were encountered:
JustinGrote
changed the title
Debug Indicator?
Add Debug Indicator to Test Run Invocation that differentiates between a run session and a debug session
Apr 14, 2023
JustinGrote
added a commit
to JustinGrote/_PR-vscode-mocha-test-adapter
that referenced
this issue
Apr 14, 2023
Is there anything that indicates whether I am in run test or debug test?
I'm running tests against a vscode extension and while I can set my test vscode to inspect, usually the debugger doesn't attach until after the test has run. I could introduce a delay but I'd much rather have some kind of indicator either by environment variable or by arg passed to my launcher script that we are in debug mode vs. run mode so I can instruct my vscode extension instance to
--inspect-brk
instead of just--inspect
. Thanks!EDIT: Looks like this is the intended behavior, but it only works if launcherscript is not specified. I think an env var would be appropriate to pass to the run process if debug is true, like
__TEST_MOCHA_ADAPTER_DEBUG=true
vscode-mocha-test-adapter/src/core.ts
Lines 279 to 281 in f519292
Alternative
Start the debugging config before launching the process, so it hopefully attaches quickly, may need to increase default attach timeout.
The text was updated successfully, but these errors were encountered: