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
So this is a sometimes repeatable issue, but not consistently repeatable. What is occurring here with some of my projects is I will create a unit test to test a piece of code like a data access agent or an API controller, and hit the "debug" button to attempt to step through the debugger. What happens (not always) is the debugger doesn't attach and skips past all breakpoints, unless the file of the function being tested is open and in view focus (ie: I open the file and stare at it until the debugger attaches). If the file is open but not in focus, the debugger will (often, but not always) skip any breakpoints in that file. If I have another file in focus later in the workflow, it will sometime break on that open file in focus instead of one before, and sometimes it will break in the open file not in focus. Its really inconsistent behavior that gets very annoying when unit testing and I often have to run a unit test 3 or 4 times before I find which part of the code is failing so I can open the file and watch it attach.
Steps to Reproduce
Create a project with a modular design and broken out by separation of concerns
Create unit tests that might span across several files/modules
set breakpoints inside the files
cause an error somewhere in code (after the first breakpoint is supposed be hit), but keep that file out of view focus
what the debugger detach and the unit test continue running in the background (you can see the output in sideBar-tests window)
Note: This does not always trigger the issue! Sometimes, following these exact steps will still break in the debugger, but usually it will detach and continue running
Expected Results
I expected breakpoints placed before any errors to break in the debugger. It does work sometimes, but very inconsistently
Actual Results
The debugger detaches and continues running in the background
Description
So this is a sometimes repeatable issue, but not consistently repeatable. What is occurring here with some of my projects is I will create a unit test to test a piece of code like a data access agent or an API controller, and hit the "debug" button to attempt to step through the debugger. What happens (not always) is the debugger doesn't attach and skips past all breakpoints, unless the file of the function being tested is open and in view focus (ie: I open the file and stare at it until the debugger attaches). If the file is open but not in focus, the debugger will (often, but not always) skip any breakpoints in that file. If I have another file in focus later in the workflow, it will sometime break on that open file in focus instead of one before, and sometimes it will break in the open file not in focus. Its really inconsistent behavior that gets very annoying when unit testing and I often have to run a unit test 3 or 4 times before I find which part of the code is failing so I can open the file and watch it attach.
Steps to Reproduce
Create a project with a modular design and broken out by separation of concerns
Create unit tests that might span across several files/modules
set breakpoints inside the files
cause an error somewhere in code (after the first breakpoint is supposed be hit), but keep that file out of view focus
what the debugger detach and the unit test continue running in the background (you can see the output in sideBar-tests window)
Note: This does not always trigger the issue! Sometimes, following these exact steps will still break in the debugger, but usually it will detach and continue running
Expected Results
I expected breakpoints placed before any errors to break in the debugger. It does work sometimes, but very inconsistently
Actual Results
The debugger detaches and continues running in the background
Settings file
"mocha.coverage": {
"enable": false,
"decoration": true,
"runWithInterval": false,
"autoUpdateInterval": 20000,
"activeOnStart": true,
"runAfterTest": false,
"runCoverageAfterFileSave": false,
"reporters": []
},
"mocha.files.glob": "/test//.test.ts",
"mocha.requires": [
"ts-node/register"
],
"mocha.logVerbose": true,
"mocha.options": {
"timeout": "999999",
"files": ".d.ts",
"exit": true,
"fullTrace": true
},
Versions
OS version
Example for reproducing
All classes are simple mongo model interfaces with some functionality to add/remove scopes from the client and claims from scopes
The text was updated successfully, but these errors were encountered: