Intellij Play and Scala breakpoint issues - scala

I am having some problems with the IntelliJ IDE where it does not stop at breakpoints.
I am running an SBT application with Play 2 framework.
It doesn't matter if I am in an async block or not, the breakpoint doesn't show a "v" inside the red circle and doesn't stop at that breakpoint.
The code reaches that position because I am using a simple print command that I see in the logs.
I tired with run configuration of Play2.
I also tried running the SBT from console and connecting to it with remote debugging.
None of them worked
just to make things clear i tried restarting intellij and the computer (OSX operating system)
This is a real problem. Any ideas?

Try execute "sbt compile" and then run your project on debug mode.

Related

Scala Console in IntelliJIDEA neither acccepts input nor prints output, comand works from temrinal

I have a "Scala/Simple module with attached Scala SDK" type project in IntelliJIDEA with which I was easily able to build and setup a couple of application configurations. A Scala workspace also works fine, but when I try to create and run a Scala Console configuration the terminal comes up, the Scala Repl appears to run fine, in that it gives me the Welcome to Scala message and prints an initial "scala>". However, although autocompletion works, the Repl otherwise appears dead to the world: nothing is returned or printed, and when I restarted and entered a one-liner to write some text to a file to test if it was just an ouptut-capture issue, that file did not appear.
I am running IntelliJIDEA 15.0.2 / idea-IU-143.1184.17 on Debian.
When I copy the command being run by IntelliJIDEA and run from a console, it works fine; command copied from IntelliJIDEA Scala Console follows:
/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Djline.terminal=NONE -Didea.launcher.port=7543 -Didea.launcher.bin.path=/usr/local/idea-IU-143.1184.17/bin -Dfile.encoding=UTF-8 -classpath /home/pacs/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.7.jar:/home/pacs/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.7.jar:/home/pacs/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.7.jar:/home/pacs/.IntelliJIdea15/config/plugins/Scala/lib/scala-plugin-runners.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/compilefontconfig.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/javazic.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar:/home/pacs/IdeaProjects/scap/out/production/scap:/usr/local/idea-IU-143.1184.17/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.compiler.rt.ConsoleRunner -usejavacp
I'm rather new to the JetBrains family of IDEs so I may be missing something obvious; does anyone have any ideas?
EDIT: I tried this on IntelliJIDEA 15.0.0 on OS X with scala 2.10.6 and JDK 1.8 with the same result so I am inclined to believe this is not a JDK, Scala, or OS-specific problem.
OK, finally figured this out: it's not a normal console where you press enter; instead you use whatever keymap goes to Plug-ins/Scala/Execute Console Statement-- probably Ctrl+Enter or ⌘+Enter.
Other people seem to have been stumped also:
Scala console won't work, IntelliJ
The IntelliJIDEA console is very nice once you know this; with autocompletion, auto-formatting, and no issues with multiline code. If I had one request though, it would be to ask the JetBrains team to please add something to the Scala Console welcome message which indicates that this is not a normal console and maybe a quick hint on how to use it.

Eclipse Kepler hangs when trying to debug Clojure project

Installed Eclipse-Kepler on a Windows 8 box. Clojure and Leiningen already installed. Installed Counterclockwise. Started up, created test Clojure project, ran without debugger, and ran successfully under debugger. Messed with it a bit more, was in and out of the debugger several times. After one debugging session got "an error" (yes, I know I should have written it down, but failed to do so. Take pity upon the soul of this poor sinner...). After that every debugging session I tried to start (using "Debug As...Clojure Application") failed to start, eventually timing out with a "Timed out waiting for REPL to start" error. Messed with it a while, uninstalled CCW, re-installed CCW - no change, REPL still refused to start under the debugger. Could always start a REPL by "sending" the text of the project file to the REPL using Ctrl-Alt-S. Finally deleted all of Kepler, re-installed, re-installed CCW, and could then debug again.
My questions: has anyone else encountered this, and is there a better workaround than blowing away the entire Eclipse install and re-extracting from the .zip? I did do a check for updated versions of anything and nothing came up. Is this a Kepler issue, i.e. might this be more stable under Juno?

eclipse stop unintended debug

I have a tomcat servlet project, which is normally running in eclipse, except of one line, which always stops the debugger without of a breakpoint. If I manually proceed debugging by pressing 2resume", all will work fine.
Is there any directive/annotation to prevent stopping the debugger on lines without breakpoints?
Clean and build ur project...i have faced similar issues...it got resolved after a full clean and build was done.

No Java console output in Eclipse; works with PyDev

I have both a Java and a PyDev project in one workspace. When I run the PyDev project (either the main script with Run > Run As > Python Run or its associated unit test with Python unit-test), the console output looks fine. However, when I switch to the Java project, open the main class, make sure the cursor focus is in the main class, and run it with Run > Run as > [my run config], no output shows up in the console, stdout or stderr. I've tried with Run/Debug > Console > Fixed width console checked and unchecked, similarly for Limit console output. "Allocate console" is check in [my run config].
I have tried redirecting output to a file in my run configuration, but the log file is empty after a run; thus, I suspect stdout/stderr are being trapped somewhere. I suspect that it is PyDev causing the issue because when I run the Java project, this exception reliably shows up about 6 times in the error log:
Launch shortcut 'org.python.pydev.debug.ui.launchShortcut.python.unittest' enablement expression caused exception. Shortcut was removed.
stacktrace:
org.eclipse.core.runtime.CoreException: No property tester contributes a property org.python.pydev.debug.ui.python_type to type class org.eclipse.ui.part.FileEditorInput
at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
(... and so on)
Additionally, printing from a Java program in a different workspace that only has Java projects works fine.
I tried uninstalling PyDev and restarting Eclipse, but I'm still having the same issue. I still have those errors after reinstalling PyDev, too.
Has anyone run into this issue before, or know of a way to fix it?
Well, I feel like an idiot; turns out, I had redirected stdout/err to a log file that I had long since forgotten about, and stuck somewhere difficult to find.
I ran into the same problem so I did some research. Seems like there was an old issue (2006-2008), but it was resolved by adding an option to the launch configurations to allocate a console. This is available from the Run -> Debug Configurations menu option, Common tab. Perhaps this is simply unchecked after the PyDev install?
If this is a new bug, there were two possible workarounds suggested:
Set up debug launch configuration that uses remote debugging instead of local debugging.
Use a buffered writer to System.out.
Here are the threads for reference:
Eclipse bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=122429
Workaround thread - java.io.Console support in Eclipse IDE

Difference in Run & Debugg mode in Eclipse for Perl

I am using Eclipse along with EPIC plug in and pad walker for running my Perl project.
I am facing a strange issue
If I "Run" the project, the system fails and exits Perl without any error message.
But if I "Debug" the project and then give "Run" the same Perl scripts work fine as expected.
Could anyone let me know the difference in the two mode ("Direct Run" & "Debug & Run")?
Found it in the EPIC source code: EPIC adds the "-d" command line option for the debug target. It does some interesting things with the stdin/stdout too to remotely control the debugger. So maybe there's some side effect there? Can you share the error message?