Using IntelliJ IDEA and the Dart plugin, where does the Dart exceptions end up? - intellij-idea

I've been playing with Angular2 using IntelliJ IDEA (2016.3.5) and the latest Dart plugin, and I just can't figure out where the errors, exceptions, assert failures etc. ends up.
I am running Dartium with DART_FLAGS="--checked" and pub serve seems to default to debug mode as far as I can read. Dart2js is configured to run in checked mode as well and the analysis server is configured for strong mode. I have also tried using the JetBrains Chrome extension so I get everything shown directly in IDEA, including the console saying Observatory listening at http://127.0.0.1:35517/.
When there are no errors the Angular2 Dart app runs just fine in Dartium but if I add an assert some where in the code, ie. on a button trigger, the app just stops working at that point with no error output anywhere. Same goes if there's some other error somewhere that pub serve didn't detect.
Dart and Dartium are both at the currently latest version, 1.22.1.

This will be fixed in Angular3 beta.x due to be released the next days it seems.

Related

I had this error in my minecraft plugin During startup

When I was starting up my minecraft server after changing my plugin i got this error and when ever I type my command it just says it back in chat
here's the error:https://pastebin.pl/view/7f462b79
This error appear when you replace the JAR file of your plugin without restart.
If you just reload, you could have this issue.
So, be sure the plugin is fully compiled and well replaced BEFORE start. If you have this issue, just restart and it should be fine.

Launch Grails 3 app from IntelliJ w/ auto-reloading enabled

It looks like IntelliJ's (Ultimate EAP 15) support for Grails 3 is in the early stages yet. If I do Run -> Debug 'Grails:My App', I'm able to launch an app from inside IntelliJ, I can set breakpoints and it works as expected.
If I make changes however, I see in the console that the file is recompiled, but when I hit reload in the browser, I don't see the changes reflected there. I have to stop and restart the app in IntelliJ before I see them. Anyone know how I can get the auto-reloading working?
After chasing this for a week, this post finally provided an explanation.
It's actually a Grails issue, not a problem with IntelliJ's Grails integration: spaces in a file's path will break automatic reloading. Renaming my project from Grails Demo to GrailsDemo got everything straighted out. (Storing a project in a folder like My Documents will also cause trouble.) The post's author indicates that this started with version 2.4.4 and it's still happening for me in 3.0.4.

Dart. IDEA plugin. Tracing and output

When I run code with the print method in IDEA, the plugin just shows console command like 'path/dart.exe path/script.dart' and exit code. No output, no tracing of error/exception.
It worked fine earlier, but was broken from some time. Maybe after upgrading Dart SDK from 1.1.1 to 1.1.3. But why? Maybe I turned off some option in IDEA. I have no idea.
When I run same script in console it works well.
Here screen of this situation: http://devnet.jetbrains.com/thread/452945
Upd. So, in the end, I made new project, and it works. Magic...

How to enable hot swap in intelliJ

I want to work on intelliJ on my webapps and I don't know how to hot swap code while working.
For example while I was working in Eclipse when I edited jsp files Eclipse automatically, instantly swapped the file so when I refreshed the page my changes were there
When I change class code in Eclipse it worked a bit longer because he republished the app but did it automatically and instantly.
I saw that intelliJ in the runtime configuration has an option 'how class swap'. I did check it but nothing is happening. I had tried compile, make, save and everything else and nothing is happening. I had to reload the app and I had to do dis manually. Secondly intelliJ reloads EVERY application in my webapp directory. I have them a lot so it taking ages. how can I turn on hot swap?
Hotswap only works in debug mode. So you need to connect to your webserver through a debug configuration. Then, after compile either the project or at least the class with the modifications, IntelliJ tries to hotswap that class.
This only works for minor changes. For example, creating new methods on the fly is not possible using this way.
Hotswap works with exploded artifacts on Update action. If it doesn't work with your project, contact support for help and provide the project to reproduce it.

How to enable hot swapping in debug mode with gradle and jetty?

I'm using jettyRun for running my simple spring application. I wanted to enable hot swapping with Intellij debuger, but looks like jetty doesn't catch the changes.
On http://docs.codehaus.org/display/GRADLE/Gradle+Jetty+Plugin I seen that it should work with:
jettyRun.scanIntervalSeconds=1
On the other hand, there is some inconsistency. On the gradle homepage this parameter is not listed: http://www.gradle.org/jetty_plugin. Anyway, is there any way to enable this on gradle?
Heh, actually found it myself now.
Looks like this parameter is not needed at all. Hot deploy works anyway.
I just wasn't able to seen that because my vaadin application was keeping session even after F5. To restart it properly it's enough to add ?debug&restartApplication to the application url.
So, Ctrl+Shift+F9 in IntelliJ + F5 in the browser (with ?debug&restartApplication) works fine ;)