dart-atom / dart

A Dart plugin for Atom.
http://dart-atom.github.io/dart/
BSD 3-Clause "New" or "Revised" License
154 stars 44 forks source link

Unable to debug #978

Open mezoni opened 8 years ago

mezoni commented 8 years ago

Debugger does nor works (not displayed on the screen). Breakpoints ignored and not listed in bottom of the screen.

devoncarew commented 8 years ago

Possibly related to https://github.com/dart-atom/dartlang/issues/979.

I see you're on the latest plugin version. Can you restart Atom to make sure that there are no bits of the old plugin loaded (the hot uninstall reinstall that atom does when upgrading packages can leave parts of the old plugin active). If you still see this issue, can you detail the steps to repro? Much appreciated!

mezoni commented 8 years ago

The steps that I have make:

Debug does not work. Also I installed new copy of Windows 7 system on the tested machine (at work) and nothing does not work again (Atom.io 1.7.3 + dartlang 0.6.15).

mezoni commented 8 years ago

Possibly related to https://github.com/dart-atom/dartlang/issues/979.

Reproducing this is very simple. Hit many times dartlang:debug-run (f5) and you can see that:

All attempts (f5) will be paused and not available for debugging (but available for performing stop). They will be paused not at the some breakpoints but at the some starting point.

mezoni commented 8 years ago

Also maybe related (I think so).

On the Windows 7 system does not work the following feature:

mezoni commented 8 years ago

I think that you should move most of functionality from lib/debug into the separate package under the dart-lang. The name such as the debug_service would be good.

I tried to understand the problem but it not directly related to Atom.io functionality. I tried to insert some notifications but it is required time to understand how it (debugging) implemented.

P.S. Also I found that in the source code Future results in many places never awaited. It is normal?

P.S. P.S. I tried to debug your plugin but source maps does not works in Atom but js code (from dart2js) is not readable. I tried to compile your plugin with dartdevc but it does not want to compile it.

devoncarew commented 8 years ago

Thanks for all the investigation!

I tried to compile your plugin with dartdevc but it does not want to compile it.

We've done some work to compile with ddc, but we're not there yet. We'll probably cycle back to that by the end of the quarter. DDC is making great progress, and has first class support for node modules now, so the timing will work out well.

Also I found that in the source code Future results in many places never awaited. It is normal?

It could be a bug, or could be just that we don't actually need to result. If you attach a few spots that look suspicious I could take a look.

I tried to debug your plugin but source maps does not works in Atom but js code (from dart2js) is not readable.

I mostly debug the code via print statements and dialing up and down the logging output. Any log statements in the code will get printed to the devtools console, and you can control the log verbosity at runtime from the plugin settings page. Print statements debugging is not my preferred method but it is currently the most practical technique.

mezoni commented 8 years ago

This is another way to debug. Not very good but slightly comfortable.

On the picture imprinted when a breakpoint was triggered after interactively removing breakpoint in Atom Editor UI.

default