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

Dartium doesn't report about dart scripts if ScriptPreprocessor specified #14865

Closed
DartBot opened this issue Nov 6, 2013 · 13 comments
Closed
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Nov 6, 2013

This issue was originally filed by deve...@gmail.com


IntelliJ IDEA (WebStorm) since IDEA 13/WebStorm 7.0.3 uses ScriptPreprocessor (https://code.google.com/p/chromium/wiki/ScriptPreprocessor) to support sourcemaps (http://youtrack.jetbrains.com/issue/WEB-6413). But it doesn't work in Dartium (31.0.1650.0) — there are no scriptParsed events about dart files (only dart.js will be reported — "clock" sample project).

Works fine if we don't use ScriptPreprocessor, but we need to use ScriptPreprocessor regardless of browser — user can use Dartium as regular browser.

Just to remind you: https://code.google.com/p/chromium/issues/detail?id=304150

@sethladd
Copy link
Contributor

sethladd commented Nov 7, 2013

Added Area-Dartium, Triaged labels.

@sethladd
Copy link
Contributor

sethladd commented Nov 7, 2013

Added Duplicate label.
Marked as being merged into #6980.

@sethladd
Copy link
Contributor

sethladd commented Nov 7, 2013

Added Triaged label.
Marked as being merged into #.

@vsmenon
Copy link
Member

vsmenon commented Nov 14, 2013

Set owner to @jacob314.
Added this to the M9 milestone.

@vsmenon
Copy link
Member

vsmenon commented Nov 14, 2013

Removed this from the M9 milestone.
Added this to the 1.1 milestone.

@jacob314
Copy link
Member

If I am understanding this correctly, you are using the ScriptPreprocessor to avoid setting breakpoints until the page is loaded. The current ScriptPreprocessor in Dartium is somewhat JS specific so I would like to verify that there isn't a simpler solution before we try to make it work for Dart.

Have you tried using
chrome.devtools.inspectedWindow.onResourceAdded.addListener
instead which will call back when every resource is loaded, not just JavaScript files? You could even listen for when the sourcemap resources have been loaded which is perhaps the even you really want.

Also, I'm unclear from the bug description whether you are saying that ScriptPreprocessor fails for JS loaded in Dartium or just for Dart loaded in Dartium.

@DartBot
Copy link
Author

DartBot commented Nov 26, 2013

This comment was originally written by devel...@gmail.com


I'm unclear from the bug description whether you are saying that ScriptPreprocessor fails for JS loaded in Dartium or just for Dart loaded in Dartium.
Browser: Dartium (31.0.1650.0)
Language of script: Dart (clock sample project).
Problem: if ScriptPreprocessor specified, there are no scriptParsed events about dart files (only dart.js will be reported — "clock" sample project).

We are using ScriptPreprocessor to append "debugger;" statement if source has source map.

  1. vm event: pause (line 0)
  2. vm event: scriptParsed
  3. IDEA load source map and set breakpoint.
  4. vm command: continue

So, user can debug file-level code. It is hack, but there is no normal way to do it.

Yes, it is not required to debug Dart in the Dartium, but user can use Dartium as regular browser (I mean — run dart app compiled to js in Dartium).

@jacob314
Copy link
Member

I suspect only dart.js is reported because the script is being run as pure Dart code rather than being compiled to js.

If you wish to test running dart2js within dartium, omit the "dart.js" bootstrap strip script and include a direct link to the output of running dart2js.
Alternately, you could locally modify dart.js changing the line
if (navigator.webkitStartDart) {

to
if (0) {

@vsmenon
Copy link
Member

vsmenon commented Feb 27, 2014

Removed this from the 1.1 milestone.
Added this to the 1.3 milestone.

@vsmenon
Copy link
Member

vsmenon commented Jun 4, 2014

Removed this from the 1.3 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@DartBot
Copy link
Author

DartBot commented Apr 7, 2015

This comment was originally written by devela...@gmail.com


https://code.google.com/p/chromium/issues/detail?id=438626

So, now, I don't see any possibility to set sourcemap-backed breakpoint — such breakpoints will not work on load due to obvious reasons.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed Type-Defect labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

7 participants