Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Source maps are broken in the debugger on Windows #9116

Closed

Description

@ForNeVeR
  1. Install the latest Atom on Windows.

  2. Install any coffeescript package (for example, color-picker).

  3. Open the debugger (Ctrl-Alt-I by default).

  4. Try to open any coffeescript file in the debugger. It will show the JS code instead of coffee (problem 1, see screenshot).

    image

  5. Try to set the breakpoint; it will not show the breakpoint and show the empty file instead (problem 2, see screenshot).
    image

  6. Try to find the corresponding sources in the tree, it will show this (problem 3):
    image

    (that's weird because it places full path C:\Users\USERNAME\etc\etc\*.coffee inside of a C:\Users\USERNAME, but it should show only file name such as file.coffee without path there as shown in the next tree leaf)

There is a //# sourceMappingURL comment in the JS code shown on the first screenshot. I've decoded it from base64 and the relevant part seems to be the following:

  "sources": [
    "C:\\Users\\USERNAME\\.atom\\packages\\color-picker\\lib\\ColorPicker-view.coffee"
  ],

I am not sure but it seems that the code contributed in #3062 is no longer working. It seems that that contributed code is still there:

filePath = '/' + path.resolve(filePath).replace(/\\/g, '/')
but maybe it somehow don't get applied in this case.

Activity

  1. ForNeVeR commented on Oct 12, 2015

    @ForNeVeR
    ContributorAuthor

    It seems that maybe that hack should be also applied to the compile function of the coffee-script module:

    exports.compile = function (sourceCode, filePath) {

  2. izuzak commented on Oct 13, 2015

    @izuzak
    Contributor

    Closing since #9122 was merged.

  3. lock commented on Jan 20, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  4. locked as resolved and limited conversation to collaborators on Jan 20, 2019
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions