Angular Dart的调试已停止在PhpStorm中工作

时间:2019-05-31 06:51:06

标签: dart phpstorm webstorm angular-dart

我在PhpStorm中有一个相当大的Angular Dart项目。我能够调试它,但是突然之间它不再起作用了(几个星期)。我不确定升级PhpStorm,Dart插件和Dart的原因是什么。但我希望debug可以处理所有更新。 我创建了最简单的Angular Dart应用程序(ToDo示例),以查看是否有帮助。没有。

Dart VM version: 2.3.1 (Tue May 21 19:28:38 2019 +0200) on "linux_x64"

PhpStorm 2019.1.2
Build #PS-191.7141.52, built on May 8, 2019
JRE: 1.8.0_202-release-1483-b49 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.0.17-300.fc30.x86_64

PhpStorm Dart plugin v191.7221

Google Chrome Version 74.0.3729.169 (Official build) (64bit)

Dart正在侦听端口53322来进行来自浏览器的HTTP连接,PhpStorm正在侦听调试端口63344(并已从Chrome连接),Chrome正在侦听调试端口45389(并已从PhpStorm连接)。

当我打开http://localhost:53322/index.html时,我看到了该应用程序,但是并没有在断点处停止执行。

我发现了类似的错误(https://youtrack.jetbrains.com/issue/WEB-30593Angular dart on WebStorm. Debug is no more working),但是提供的解决方案没有帮助。

有没有办法使调试再次起作用?我想避免降级。

1 个答案:

答案 0 :(得分:1)

Not specific to Angular - debugging web apps doesn't work with SDK 2.3.1. Please follow WEB-39095 for updates.

Workarounds:

  • Start debug session from WebStorm. Breakpoints won't work. Stop Debug session.
  • Without closing the project go to Terminal and run pub global activate webdev 1.0.1.
  • Start debug session from WebStorm again. Breakpoints should work.

Or:

  • Run webdev server manually from Terminal explicitly specifying hostname, for example: pub global run webdev serve --hostname 127.0.0.1 web:53322
  • In the IDE create JavaScript Debug run configuration that opens webdev URL directly, e.g. http://localhost:53322/index.html, press Debug