Skip to content

Visual Studio ignores inlineSourceMaps / inlineSources option of tsconfig.json #6317

Closed

Description

Hi,

There's mention of this problem in: #4360

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?

The issue is still there with TS 1.7.

Activity

  1. nycdotnet commented on Jan 4, 2016

    @nycdotnet

    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

  2. johnnyreilly commented on Jan 4, 2016

    @johnnyreilly
    Author

    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..

  3. johnnyreilly commented on Jan 4, 2016

    @johnnyreilly
    Author

    Is this resolved with 1.8 then?

  4. mhegazy commented on Jan 4, 2016

    @mhegazy
    Contributor

    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.

  5. johnnyreilly commented on Jan 4, 2016

    @johnnyreilly
    Author

    Mohamed Hegazy (@mhegazy) is this resolved?:

    Is Visual Studio due to no longer ignore inlineSourceMaps / inlineSources option of tsconfig.json when TS 1.8 ships?

  6. mhegazy commented on Jan 4, 2016

    @mhegazy
    Contributor
    • 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.

    does that answer your question?

  7. johnnyreilly commented on Jan 15, 2016

    @johnnyreilly
    Author

    Hi Mohamed Hegazy (@mhegazy),

    Sorry for the delay in responding.

    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

      "compilerOptions": {
        "inlineSourceMap": true,
        "inlineSources": true,
        "noImplicitAny": false,
        "preserveConstEnums": true,
        "removeComments": false,
        "sourceMap": false
      },
    

    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.)

    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 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.ts without 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 hope that's clear - please say if not.

  8. johnnyreilly commented on Jan 15, 2016

    @johnnyreilly
    Author

    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.

  9. paulvanbrenk commented on Jan 15, 2016

    @paulvanbrenk
    Contributor

    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 ;) )

  10. johnnyreilly commented on Jan 15, 2016

    @johnnyreilly
    Author

    Great! Is this support due to land in VS 2015 with TypeScript 1.8?

  11. mhegazy commented on Jan 16, 2016

    @mhegazy
    Contributor

    that is correct.

  12. johnnyreilly commented on Jan 16, 2016

    @johnnyreilly
    Author
  13. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions