Issue #78 Updates typescript to 2.3.2, adds vs code launch configs #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This adds two new launch configs and a compound config for debugging the client typescript.
There is a LOT going on with VS Code right now, and there has been a lot of instability in general around both .NET core and Typescript debugging. Make sure your C# extension is up to date, and if you have trouble consider installing a pre-release if one is available.
Either way though, the debugging experience when you try to mix typescript and .net core debugging is fairly rough right now, but a lot of effort is going into making that work much smoother over the next few months.
launch configs
"[Development] Debug TypeScript" launches a browser for debugging via the chrome debug extensions. Assumes the server is already running. The key here seems to be specifying the sourceMapPathOverrides setting instead of letting it use the default paths.
needs testing with linux / osx; I'm not sure the sourceMapPathOverrides is quite right for other OSes.
"[Development] Launch Server (no browser)" launches the asp.net core server, but does not open a browser. Intended for use with multi-target debugging in VS Code. Pretty much the same as the existing one, just doesn't open a browser automatically
"[Development] Debug Server & Client" this is a compound debugger configuration that starts both of the above configurations in parallel.
Start multi-target debugging manually:
The debug bar in VS Code will show two debugger configs and give you a drop down to switch between them. You can set breakpoints for server or client code.
Using the compound config
The "[Development] Debug Server & Client" config starts debuggers for both the server and client configs at the same time. This is not the smoothest experience since the client config will try to open the browser before the server process is running. Keep refreshing the browser window and it should bring up the page as soon as the server is online.