0

How do I stop VS 2019 breaking on javascript/typescript exceptions and only break when it hits my breakpoints? I've unselected JavaScript Runtime Exceptions but still it keeps breaking.

Background: I'm trying to get Chutzpah+Jasmine going in my TypeScript UI code, hosted in a pretty standard .Net framework MVC/WebAPI/Web Compiler/TypeScript app. If I run the tests without debugging then Chutzpah/Jasmine gives the results I expect, so the tests are working so far. However, I suspect the Jasmine test runner is unaware of the bundling going on and is hitting loads of errors in some of the inter-dependent scripts that I don't get in normal runtime so I'd like to just ignore them for now. Due to all these other errors breaking the session it is impossible to step through the unit under test. I have Chrome set as the default html app, but it is launching IE, which is fine as I like to debug in VS. I have tried enabling/disabling javascript debugging in IE but that seems to have no effect either way.

enter image description here

Etherman
  • 1,777
  • 1
  • 21
  • 34
  • Please try to uncheck `Just My Code` option under `Tools`-->`Options`-->`Debugging`-->`General` and then clean and build your project. – Mr Qian May 14 '20 at 02:39
  • @Perry thanks but that did not seem to make a difference. – Etherman May 14 '20 at 10:45
  • Well I have solved my problem but it does not answer my actual question: I have tweaked the References section of my chutzpah.json config so all scripts are added to the test suite in the same order they are bundled/included in the actual html output. I now get no errors so I can test and debug in peace, which is really a much better solution than the question I was asking. The question is interesting and annoying though so I'd still like to see what the deal is! – Etherman May 14 '20 at 11:43

0 Answers0