Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging #11

Closed
kolombet opened this issue Mar 8, 2017 · 8 comments
Closed

debugging #11

kolombet opened this issue Mar 8, 2017 · 8 comments

Comments

@kolombet
Copy link

kolombet commented Mar 8, 2017

I can't see sourcemaps when debugging in chrome, only plain js. How to debug code with this template?

@Majirefy
Copy link

Majirefy commented Mar 8, 2017

@kolombet
This project doesn't have source map support now.
@rroylance Hope to add it!

@rroylance
Copy link
Owner

I'm looking into getting sourcemaps and possibly breakpoints working. Hopefully soon! Thanks.

@rroylance
Copy link
Owner

@kolombet @Majirefy I've been able to get it to source map to the individual files, however it maps to the compiled typescript, not the typescript itself... any idea how to get it to map to the typescript, I'm having no luck and searches isn't helping ? The compiled typescript is pretty close to the actual code, so it'd definitely be better than nothing if getting typescript mapping is not possible at the moment.

Let me know if you'd like the current mapping (to the compiled typescript) committed or if you'd rather wait for typescript mapping.

@rroylance rroylance mentioned this issue Mar 26, 2017
@Nepoxx
Copy link
Contributor

Nepoxx commented Apr 6, 2017

What do you mean the compiled Typescript?

Ideally all you need is an inline-sourcemap in the bundled file.

@Nepoxx
Copy link
Contributor

Nepoxx commented Apr 6, 2017

See #18

The following are instructions to get this working with Visual Studio Code and Chrome. Tested and working on Arch Linux.

  1. Install Debugger For Chrome in VSCode
  2. Launch the dev server npm run server:dev
  3. Launch VSCode's debugger
  4. Enjoy!

Here is my launch.json file which launches a standalone chrome window:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "http://localhost:9000",
      "webRoot": "${workspaceRoot}",
      "userDataDir": "${workspaceRoot}/.vscode/chrome",
      "runtimeExecutable": "/usr/bin/google-chrome-stable"
    },
    {
      "type": "chrome",
      "request": "attach",
      "name": "Attach to Chrome",
      "port": 9222,
      "webRoot": "${workspaceRoot}"
    }
  ]
}

( runtimeExecutable is needed in my case because my executable's name is non-standard, you will likely not need it)

@rroylance
Copy link
Owner

By compiled TypeScript I mean the JS that gets generated. I only got it to show where the issue was in the JS that's generated, not the original TS. I'll merge your update in and see if that satisfies those that need it. Thanks.

@Nepoxx
Copy link
Contributor

Nepoxx commented Apr 6, 2017

I'll test the workflow on Windows tomorrow and update the readme accordingly :)

@rroylance
Copy link
Owner

@Nepoxx Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants