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 TypeScript #2

Closed
angelozerr opened this issue Feb 8, 2016 · 22 comments
Closed

Debugging TypeScript #2

angelozerr opened this issue Feb 8, 2016 · 22 comments
Milestone

Comments

@angelozerr
Copy link
Owner

typescript.java uses JSDT Editor for the *.ts file. So It should be cool if we could debug TypeScript like TypEcs with:

@piotrtomiak
Copy link
Contributor

@angelozerr we have the support scheduled for upcoming release. I will ensure that breakpoints work with your editor as well, for web and nodejs debugging. Is there any other target for TypeScript debugging?

@piotrtomiak
Copy link
Contributor

@angelozerr do you have any update site from which I could install your TypeScript plugins? If I am correct and the files are opened in a regular JSDT editor, there should be no problem with putting breakpoints.

@angelozerr
Copy link
Owner Author

@piotrtomiak
Copy link
Contributor

Yeah, the update-site is not working. I've checked out projects from git and it works. We are going to release source map support in 1-2 weeks. To get workspace mapping working, you will need to setup sourceRoot property correctly:

{
  "compilerOptions": {
      "target": "es5",
      "outDir": "target/js-build",
      "sourceMap": true,
      "sourceRoot": "workspace:test/src/main/typescript"
  },
  "files": [
      "src/main/typescript/demo.ts"
  ]
}

@angelozerr
Copy link
Owner Author

Yeah, the update-site is not working.

To be honnest with you, I have done that quicly without testing it. I have created the issue
#7

We are going to release source map support in 1-2 weeks.

Very cool!

To get workspace mapping working, you will need to setup sourceRoot property correctly:

Is it a standard tsconfig.json property?

@piotrtomiak
Copy link
Contributor

Is it a standard tsconfig.json property?

Yes. There are several ways to get this working depending on where you keep sources and whether you use Externally Launched Web app or JEE Web App launching. There'll be a FAQ on that, so no worries :)

@angelozerr
Copy link
Owner Author

Thanks @piotrtomiak I'm a little exciting to play with your debugger :)

@piotrtomiak
Copy link
Contributor

@angelozerr Webclipse 2016 CI 1 release contains the updated debugger, which has in-built support for source maps. It supports your TypeScript editor as well. Please refer to FAQ: https://www.genuitec.com/tech/javascript-debugging-with-source-maps/ on how to configure your project to have the best experience with source maps.

Please let me know what do you think about the support!

@angelozerr
Copy link
Owner Author

@piotrtomiak I will test your work, but I don't know if it will work since now I have a custom TypeScriptEditor (not JSDT JavaEditor)

@piotrtomiak
Copy link
Contributor

Yes, it won't work. I'll look it on Monday.

@angelozerr
Copy link
Owner Author

Argh -( sorry with this changes. Now I will not change TypeScript editor since I have a very well performance (because I don't create a JSDT DOM AST).

@piotrtomiak
Copy link
Contributor

No problem, shouldn't be a big deal. Would you be able to create a snapshot build with the editor, so that I don't have to configure TypeScript.java build environment?

@angelozerr
Copy link
Owner Author

@piotrtomiak
Copy link
Contributor

Great, thanks!

@angelozerr
Copy link
Owner Author

Your are welcome. Just for your information, I have started to fill wiki to show implemented features of TypeScript Editor at https://github.com/angelozerr/typescript.java/wiki/Editor-Features (it's not finished).

I will implement soon "Compilation" feature (like "compilation on save) and after I will create a release. Hope MyEclipse will be interested with typescript.java

piotrtomiak added a commit to Genuitec/typescript.java that referenced this issue Apr 11, 2016
@piotrtomiak
Copy link
Contributor

Hope MyEclipse will be interested with typescript.java

We definitely are :) I hope we will be able to integrate support in a near future

angelozerr added a commit that referenced this issue Apr 11, 2016
Issue #2: Support for debugging TypeScript with JavaScript Debugger.
@angelozerr
Copy link
Owner Author

@piotrtomiak I'm really sorry, but I have changed content type :

  • ts.eclipse.ide.core.jsdt.tsSource to ts.eclipse.ide.core.tsSource
  • ts.eclipse.ide.core.jsdt.tsxSource to ts.eclipse.ide.core.tsxSource
  • ts.eclipse.ide.core.jsdt.jsxSource to ts.eclipse.ide.core.jsxSource

I had no time to test it with Webclipse, hope it will not causes problem.

We definitely are :) I hope we will be able to integrate support in a near future

Great news!

@piotrtomiak
Copy link
Contributor

I have changed content type

That's not a problem for debugger setup. All the support is tied to editor's ID, so unless you change the id of editor, everything works.

@angelozerr
Copy link
Owner Author

That's not a problem for debugger setup.

Cool! Thanks for your answer.

@angelozerr
Copy link
Owner Author

@piotrtomiak I have added a wilki section about TypeScript debugging https://github.com/angelozerr/typescript.java/wiki/TypeScript-Debugging

If you have a link to Webclipse & TypeScript debugging, tell me, I will add it. It should be cool if we have a demo with this debugging feature.

@piotrtomiak
Copy link
Contributor

Thanks! I'll be looking into creation of such a demo and I'll let you know once it's available. Were you able to test debugger?

@angelozerr
Copy link
Owner Author

Oxygen hosts now SourceMap support by integrating my PR https://bugs.eclipse.org/bugs/show_bug.cgi?id=487465

It's not perfect (JSDT SourceMap support should be improved), but we can start to debug TypeScript.

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

2 participants