This launch configuration allows me to debug typescript code:
{
"name": "[Development] Debug Client",
"type": "chrome",
"request": "launch",
"url": "${auto-detect-url}",
"sourceMaps": true,
"userDataDir": "${workspaceRoot}/.vscode/chrome",
"webRoot": "${workspaceRoot}/Client"
}
dotnet run.userDataDir option forces to launch the separate chrome intance and may be removedIs typescript debugging currently not working?
Doesn't work for me when [Development] Launch Web is used.
Also, current "Launch Web" configs assume, that chrome is the default browser, that is not always true.
Let me take a look haven't reconfigured it in a while.
Thanks for letting me know!
I tried the configuration above (ran dotnet run in a separate cmd window), but it gave me:
Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a target that matches: ${auto-detect-url}.
Was there anything else that needed to be setup?
The other option is debugging within Chrome devtools:

Doing a Ctrl-P (or Command-P for MAC) has the file navigator pop-up, so you can just search for /containers or the filename specifically to easily get to things.

what if you specify url directly here:"url": "${auto-detect-url}", ?
Didn't work when I did localhost:5000 there either.
Do you have this successfully working with the latest from Master? @ORuban
I have checked and found a little mess. The following are the results (current master + latest VSCode (osx) + latest Debugger for Chrome):
[Development] Launch Web configuration .Debug adapter process has terminated unexpectedly error if I try to debug.VSCode Insiders version raises the same Cannot connect to runtime process, timeout after 10000 ms error, as you mentioned. Actually, the problem is that new Chrome instance openshttp://%24%7Bauto-detect-url%7D/ url (and so cannot attach). However, if Chrome already has a tab opened with localhost:5000 url, debugging is working well. {
"name": "[Development] Debug Client",
"type": "chrome",
"request": "launch",
"url": "http://localhost:5000",
"sourceMaps": true,
"userDataDir": "${workspaceRoot}/.vscode/chrome",
"webRoot": "${workspaceRoot}/Client"
},
Double check shows that Insiders version of VSCode has Debugger for Chrome 2.5.3, but default VSCode only 2.5.1 (no update available). So partially problem may be also with extension itself.
Just tried updating to 2.5.3 (with the latest VSCode, not the insider one or anything) and unable to get it working.
It would be great to have this ability though! Hope we can figure it out soon..
Was looking at this a bit, and I've found a way to get it working. I'll tossing in a quick pull request consideration, though we should probably discuss some particulars and update the readme before merging it. This stuff is kinda rough right now... hopefully the various teams working on VS Code and extensions can smooth this out soon.
Yeah VSCode definitely doesn't make it too easy (at the moment) to setup debugging unless it's the most basic project. Checking out the PR later or tomorrow Stephen, great job!
Yeah, VS Code F5 doesn't seem to work very well. It sometimes work and sometimes does not.
Seems like running via command line is more stable at the moment.
I cloned yesterday fyi
@jrmcdona have you tried after the latest vscode update as well as the updated version of this Repo?
@isaac2004 which debug settings do you use to launch your app? Or what is your work flow you found best for debugging TypeScript.
Do you use "[Development] Launch Web" or a combination of server and browser commands?
I am having some luck with setting a breakpoint in Chrome dev tools sources on a TypeScript file.
But other times, the DIST folder is bundled and no TypeScript sources are found.
I am unable to see why this behavior is different at times.

@jrmcdona I imagine your devtool is doing something weird. devtool setting in webpack determines if you get sourcemaps or not. What is it set to?
@isaac2004 think you are right there. I had touched my webpack.config because I was adding in the enviornments files (http://tattoocoder.com/angular-cli-using-the-environment-option/) and tring to some trickery and created a new script build:devMocked to get all mocked environment based on eviornment.devMocked.ts file. I must have done something wrong.
After putting back the web.config.js I can now run:
My breakpoints are hitting now. Thanks
Most helpful comment
@isaac2004 think you are right there. I had touched my webpack.config because I was adding in the enviornments files (http://tattoocoder.com/angular-cli-using-the-environment-option/) and tring to some trickery and created a new script build:devMocked to get all mocked environment based on eviornment.devMocked.ts file. I must have done something wrong.
After putting back the web.config.js I can now run:
My breakpoints are hitting now. Thanks