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
{{ message }}
Repository navigation
Visual Studio ignores inlineSourceMaps / inlineSources option of tsconfig.json #6317
1.) There appears to be no way to set the flags (inlineSourceMap ,inlineSources ) in visual studio 2013 with the 1.5 TypeScript extension installed. Is this a known bug?
However the discussion moves off to cover debugging issues and I'm not clear whether the first issue is resolved. Is Visual Studio due to no longer ignore inlineSourceMaps / inlineSources option of tsconfig.json when TS 1.8 ships?
Thanks Steve. Happy New Year! It's good that there is another way but in this particular case I have 2 TypeScript projects inside my ASP.Net project. One for tests and one for source and I use different compiler settings for each..
VS 2013 does not support tsconfig.json. you need to specify all properties as MSBuild properties
No UI is available in project properties to set these two properties, nether in VS 2013 no VS 2015. the wiki page has details on how to do it manually.
TS 1.8 should add support for debugging JS files generated with inlineSoruceMaps, and inlineSources, which were not supported before.
TS 1.8 should add support for debugging JS files generated with inlineSoruceMaps, and inlineSources, which were not supported before.
I'm not quite sure if this means that inlineSourceMaps and inlineSources in tsconfig.json are not currently respected by Visual Studio but will be as of TS 1.8. I suspect you mean something else..
I think my original question was not phrased as well as it might have been. Let me try again:
I'm using Visual Studio 2015 with tsconfig.json and TypeScript 1.7. Frustratingly it seems that Visual Studio is ignoring options in my tsconfig.json - specifically the options related to sourcemaps. These are the settings in my tsconfig.json
If I invoke tsc then inline sourcemaps are generated as I would hope. But if you save a file in Visual Studio then the inlineSources related options are ignored. Inline source maps are not created. In this Visual Studio project I have 2 TypeScript projects; 1 for source code for the site and 1 for testing. Perhaps Visual Studio cannot cope with more than 1 TypeScript project in a VS project? (Although I seem to recall that Paul van Brenk (@paulvanbrenk) said that it was supposed to be able to support this... I may be wrong.)
If you clone this repo and go to the PoorClaresArundel folder on the command line you can invoke tsc directly like this:
npm run ts
This generates inline sourcemaps for every file - as expected. Now try in Visual Studio:
Open up Visual Studio with this solution
Go to the PoorClaresArundel project
Go to the js folder and open up app.ts. Make a change to the file and hit "save". VS should compile app.tswithout inline sourcemaps.
I could obviously work around this by just ignoring the VS tooling and invoking tsc directly in my build process. But I think that Visual Studio ought to be respecting tsconfig.json. If it's not intentionally then it would be very helpful to understand which properties VS respects and which it does not.
I can see discussion here that might imply tsconfig.json support will work as expected with TS 1.8: #5287
Not certain though. Support for multiple tsconfig.json files in ASP.NET v5 projects makes me wonder if ASP.Net pre v5 is not going to get this amend? Are ASP.Net v5 and ASP.Net pre v5 going to be treated differently in Visual Studio? That'd be a real shame.
John Reilly (@johnnyreilly) Current plan is to support all project types (at least the ones that ship in Visual Studio. Others will probably work, but if I don't know about it I can't test it ;) )
Activity
nycdotnet commentedon Jan 4, 2016
I know you're trying to use tsconfig.json, but just FYI - all of the options should be available in VS via MSBuild. https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects
johnnyreilly commentedon Jan 4, 2016
Thanks Steve. Happy New Year! It's good that there is another way but in this particular case I have 2 TypeScript projects inside my ASP.Net project. One for tests and one for source and I use different compiler settings for each..
johnnyreilly commentedon Jan 4, 2016
Is this resolved with 1.8 then?
mhegazy commentedon Jan 4, 2016
John Reilly (@johnnyreilly) what do you mean resolved?
as Steve Ognibene (@nycdotnet) mentioned all these properties are accessible using through MSBuild using the properties defined in https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects, there is just no UI for it.
johnnyreilly commentedon Jan 4, 2016
Mohamed Hegazy (@mhegazy) is this resolved?:
mhegazy commentedon Jan 4, 2016
does that answer your question?
johnnyreilly commentedon Jan 15, 2016
Hi Mohamed Hegazy (@mhegazy),
Sorry for the delay in responding.
I'm not quite sure if this means that
inlineSourceMapsandinlineSourcesintsconfig.jsonare not currently respected by Visual Studio but will be as of TS 1.8. I suspect you mean something else..I think my original question was not phrased as well as it might have been. Let me try again:
I'm using Visual Studio 2015 with
tsconfig.jsonand TypeScript 1.7. Frustratingly it seems that Visual Studio is ignoring options in mytsconfig.json- specifically the options related to sourcemaps. These are the settings in mytsconfig.jsonIf I invoke
tscthen inline sourcemaps are generated as I would hope. But if you save a file in Visual Studio then theinlineSourcesrelated options are ignored. Inline source maps are not created. In this Visual Studio project I have 2 TypeScript projects; 1 for source code for the site and 1 for testing. Perhaps Visual Studio cannot cope with more than 1 TypeScript project in a VS project? (Although I seem to recall that Paul van Brenk (@paulvanbrenk) said that it was supposed to be able to support this... I may be wrong.)You can see the problem for yourself by taking a look at the PoorClaresArundel project in the following repo: https://github.com/johnnyreilly/poorclaresarundel
If you clone this repo and go to the PoorClaresArundel folder on the command line you can invoke
tscdirectly like this:This generates inline sourcemaps for every file - as expected. Now try in Visual Studio:
jsfolder and open upapp.ts. Make a change to the file and hit "save". VS should compileapp.tswithout inline sourcemaps.I could obviously work around this by just ignoring the VS tooling and invoking
tscdirectly in my build process. But I think that Visual Studio ought to be respectingtsconfig.json. If it's not intentionally then it would be very helpful to understand which properties VS respects and which it does not.I hope that's clear - please say if not.
johnnyreilly commentedon Jan 15, 2016
I can see discussion here that might imply
tsconfig.jsonsupport will work as expected with TS 1.8: #5287Not certain though. Support for multiple tsconfig.json files in ASP.NET v5 projects makes me wonder if ASP.Net pre v5 is not going to get this amend? Are ASP.Net v5 and ASP.Net pre v5 going to be treated differently in Visual Studio? That'd be a real shame.
paulvanbrenk commentedon Jan 15, 2016
John Reilly (@johnnyreilly) Current plan is to support all project types (at least the ones that ship in Visual Studio. Others will probably work, but if I don't know about it I can't test it ;) )
johnnyreilly commentedon Jan 15, 2016
Great! Is this support due to land in VS 2015 with TypeScript 1.8?
mhegazy commentedon Jan 16, 2016
that is correct.
johnnyreilly commentedon Jan 16, 2016
Boom! Thanks Mohamed Hegazy (@mhegazy)