ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
731 stars 121 forks source link

Debugger does not work with error:"Connection failed: econnrefused". #573

Closed Pylipala closed 9 years ago

Pylipala commented 9 years ago

I am on Mac OSX Yosemite,IDEA 14.1.1,Intellij-Erlang 0.5.11.

I have download code from https://github.com/erlware/Erlang-and-OTP-in-Action-Source

I open chapter_01/pingpong.erl as below:

%% ---------------------------------------------------------------------
%% File: pingpong.erl

-module(pingpong).

-export([run/0]).

run() ->
    Pid = spawn(fun ping/0),
    Pid ! self(),
    receive
        pong -> ok
    end.

ping() ->
    receive
        From -> From ! pong
    end.

and add breakpoints at line 9:

    Pid = spawn(fun ping/0),

Then I right click the "run()" and choose "Debug pingpong.run".

System just print below output in Console:

/usr/local/lib/erlang/bin/erl -pa /private/var/folders/0c/80mgty691f3bmz1qjmb212440000gn/T/intellij_erlang_debugger_92.tmp -pa /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source/out/production/Erlang-and-OTP-in-Action-Source -pa /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source -run debugnode main 64777 -noshell -s init stop
Connection failed: 
econnrefused

I tried several times but in vain. Could somebody help?

deadok22 commented 9 years ago

Hi @Pylipala!

Could you please enable logging as described in https://github.com/ignatov/intellij-erlang/issues/512 and share the corresponding log file.

Thank you!

Pylipala commented 9 years ago

Hi @deadok22 I enabled logging and to make log file smaller for analysis, I removed all old idea.log files and restart IDEA. Then I debug again. Below is log file content:

2015-04-04 20:31:58,313 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2015-04-04 20:31:58,376 [     63]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-141.178.9, 31 Mar 2015 00:00) 
2015-04-04 20:31:58,376 [     63]   INFO -        #com.intellij.idea.Main - OS: Mac OS X (10.10.2, x86_64) 
2015-04-04 20:31:58,377 [     64]   INFO -        #com.intellij.idea.Main - JRE: 1.6.0_65-b14-466.1-11M4716 (Apple Inc.) 
2015-04-04 20:31:58,377 [     64]   INFO -        #com.intellij.idea.Main - JVM: 20.65-b04-466.1 (Java HotSpot(TM) 64-Bit Server VM) 
2015-04-04 20:31:58,385 [     72]   INFO -        #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseCompressedOops -Djb.vmOptionsFile=/Applications/IntelliJ IDEA 14.app/Contents/bin/idea.vmoptions -Didea.java.redist=NoJavaDistribution -Didea.home.path=/Applications/IntelliJ IDEA 14.app/Contents -Didea.executable=idea -Didea.paths.selector=IntelliJIdea14 
2015-04-04 20:31:58,420 [    107]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 35 ms 
2015-04-04 20:31:58,431 [    118]   INFO -        #com.intellij.idea.Main - initializing environment 
2015-04-04 20:31:58,433 [    120]   INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/bash -l -i -c '/Applications/IntelliJ IDEA 14.app/Contents/bin/printenv.py' '/private/var/folders/0c/80mgty691f3bmz1qjmb212440000gn/T/intellij-shell-env0.tmp' 
2015-04-04 20:31:58,498 [    185]   INFO - .intellij.util.EnvironmentUtil - shell environment loaded (21 vars) 
2015-04-04 20:32:00,463 [   2150]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor intellilang-python-support.xml 
2015-04-04 20:32:02,418 [   4105]   INFO - llij.ide.plugins.PluginManager - 129 plugins initialized in 2267 ms 
2015-04-04 20:32:02,418 [   4105]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: CSS Support, Copyright (8.1), Coverage, Git Integration (8.1), IDEA CORE, Terminal (0.1) 
2015-04-04 20:32:02,418 [   4105]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Erlang (0.5.11) 
2015-04-04 20:32:02,419 [   4106]   INFO - llij.ide.plugins.PluginManager - Disabled plugins: ASP (0.1), Android Support (10.1.1.0), Ant Support (1.0), Application Servers View (0.2.0), AspectJ Support (1.2), Bytecode Viewer (0.1), CFML Support (3.53), CVS Integration (11), ClearCase Integration (2.0), Cloud Foundry integration (1.0), CloudBees integration (1.0), CoffeeScript (2.0), Cucumber for Groovy (999.999), Cucumber for Java (999.999), DSM Analysis (1.0.0), Database Tools and SQL (1.0), Eclipse Integration (3.0), EditorConfig (1.0), Emma, Flash/Flex Support (1.0), FreeMarker support (1.0), GNU GetText files support (*.po) (134.SNAPSHOT), GWT Support (1.0), Geronimo Integration (1.0), Gherkin (999.999), GitHub, GlassFish Integration (1.0), Google App Engine Integration (1.1.4), Gradle, Grails (9.0), Groovy (9.0), GuiceyIDEA (8.0), HAML, HTML Tools (2.0), Heroku integration (1.0), Hibernate Support (1.0), I18n for Java, IntelliLang (8.0), J2ME (1.0), JBoss Drools Support (1.0), JBoss Integration (1.0), JBoss Seam Pageflow Support (1.0), JBoss Seam Pages Support (1.0), JBoss Seam Support (1.0), JBoss jBPM (2.0.0), JSR45 Integration (1.0), JUnit (1.0), Jade (140.2144), Java Bytecode Decompiler (0.1), Java EE: Batch Applications (1.0), Java EE: Bean Validation Support (1.1), Java EE: Contexts and Dependency Injection (1.1), Java EE: EJB, JPA, Servlets (1.0), Java EE: JMS, JSON Processing, Concurrency, Transaction  (1.0), Java EE: Java Server Faces (2.2.X.), Java EE: RESTful Web Services (JAX-RS) (1.0), Java EE: Web Services (JAX-WS) (1.9), Java EE: WebSockets (1.0), Java Server Pages Integration (1.0), JavaFX (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Jetty Integration (1.0), LESS support, Maven Integration, Maven Integration Extension, NodeJS (141.2), OpenShift integration (1.0), Osmorc (1.4.6), Perforce Integration (2.0), Persistence Frameworks Support (1.0), PhoneGap/Cordova Plugin (141.1), Playframework Support (1.0), Plugin DevKit (1.0), Properties Support, Python (4.0 Beta 139.3), QuirksMode, REST Client, Refactor-X (2.01), Remote Hosts Access (0.1), Resin Integration (8.1), SASS support, SSH Remote Run (0.1), Spring AOP/@AspectJ (1.0), Spring Batch (1.0), Spring Boot (1.0), Spring Data (1.0), Spring Integration Patterns (1.0), Spring MVC (1.0), Spring OSGi (1.0), Spring Roo Console (1.0), Spring Security (1.0), Spring Support (1.0), Spring Web Flow (1.0), Spring Web Services (1.0), Spring WebSocket (1.0), Spy-js (999.999), Struts 1.x (2.0), Struts 2 (1.0), Stylus support (999.999), Subversion Integration (1.1), TFS Integration (999.999), Tapestry support (1.0), Task Management (1.0), TestNG-J (8.0), Thymeleaf (1.0), Time Tracking (1.0), Tomcat and TomEE Integration (1.0), UI Designer, UML Support (1.0), Vaadin Support (1.0), Velocity support (1.0), W3C Validators (2.0), WebLogic Integration (1.0), WebSphere Integration (1.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, ZKM-Unscramble (1.0), dmServer Support (0.9.5), hg4idea (10.0) 
2015-04-04 20:32:02,647 [   4334]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=755630080 
2015-04-04 20:32:02,714 [   4401]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /Applications/IntelliJ IDEA 14.app/Contents/bin/fsnotifier 
2015-04-04 20:32:02,748 [   4435]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 
2015-04-04 20:32:02,817 [   4504]   INFO - pi.util.registry.RegistryState - Registry values changed by user: 
2015-04-04 20:32:02,817 [   4504]   INFO - pi.util.registry.RegistryState -   debugger.valueTooltipAutoShowOnSelection = true 
2015-04-04 20:32:03,336 [   5023]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: [#org.intellij.erlang.debugger.ErlangDebuggerLog DEBUG] 
2015-04-04 20:32:04,249 [   5936]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2015-04-04 20:32:04,436 [   6123]   INFO - pl.stores.ApplicationStoreImpl - 78 application components initialized in 2005 ms 
2015-04-04 20:32:04,459 [   6146]   INFO - .intellij.idea.IdeaApplication - App initialization took 6874 ms 
2015-04-04 20:32:04,643 [   6330]   WARN - om.intellij.util.ProfilingUtil - Profiling agent is not enabled. Add -agentlib:yjpagent to idea.vmoptions if necessary to profile IDEA. 
2015-04-04 20:32:05,727 [   7414]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,732 [   7419]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,736 [   7423]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,738 [   7425]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,743 [   7430]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,743 [   7430]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,743 [   7430]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:32:05,890 [   7577]   INFO - ellij.project.impl.ProjectImpl - 110 project components initialized in 602 ms 
2015-04-04 20:32:05,948 [   7635]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 58 ms 
2015-04-04 20:32:06,845 [   8532]   INFO - tartup.impl.StartupManagerImpl - /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source/.idea/misc.xml case-sensitivity: false 
2015-04-04 20:32:08,935 [  10622]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 2574 ms 
2015-04-04 20:32:09,374 [  11061]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 4117 ms 
2015-04-04 20:32:09,871 [  11558]   INFO - CompilerWorkspaceConfiguration - Available processors: 8 
2015-04-04 20:32:14,063 [  15750]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2015-04-04 20:32:14,849 [  16536]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 
2015-04-04 20:32:15,773 [  17460]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 1716 ms: 0 min 1sec 
2015-04-04 20:32:16,397 [  18084]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 
2015-04-04 20:34:48,908 [ 170595]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2015-04-04 20:34:48,945 [ 170632]   INFO - j.compiler.server.BuildManager - Using preloaded build process to compile /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source 
2015-04-04 20:34:48,977 [ 170664]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 74 ms: 0 min 0sec 
2015-04-04 20:34:49,613 [ 171300]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 
2015-04-04 20:38:13,563 [ 375250]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,567 [ 375254]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,567 [ 375254]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,569 [ 375256]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,571 [ 375258]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,571 [ 375258]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,571 [ 375258]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,572 [ 375259]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,572 [ 375259]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,573 [ 375260]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,574 [ 375261]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,575 [ 375262]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,630 [ 375317]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,632 [ 375319]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,633 [ 375320]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,635 [ 375322]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,636 [ 375323]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,637 [ 375324]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,637 [ 375324]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,639 [ 375326]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,639 [ 375326]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,640 [ 375327]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,642 [ 375329]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:13,642 [ 375329]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:15,510 [ 377197]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:15,512 [ 377199]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:15,512 [ 377199]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 20:38:15,631 [ 377318]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2015-04-04 20:38:15,649 [ 377336]   INFO - j.compiler.server.BuildManager - Using preloaded build process to compile /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source 
2015-04-04 20:38:15,674 [ 377361]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 47 ms: 0 min 0sec 
2015-04-04 20:38:16,371 [ 378058]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 

I have no finding~

deadok22 commented 9 years ago

As I can see from the attached log, you have not enabled erlang debugger logging. Instead of typing in #org.intellij.erlang.debugger.ErlangDebuggerLog DEBUG you should only paste the logger category name which is #org.intellij.erlang.debugger.ErlangDebuggerLog

Pylipala commented 9 years ago

@deadok22 I followed your instruction and now got DEBUG log as below:

2015-04-04 21:47:59,707 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2015-04-04 21:47:59,762 [     55]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-141.177.4, 23 Mar 2015 00:00) 
2015-04-04 21:47:59,762 [     55]   INFO -        #com.intellij.idea.Main - OS: Mac OS X (10.10.2, x86_64) 
2015-04-04 21:47:59,762 [     55]   INFO -        #com.intellij.idea.Main - JRE: 1.6.0_65-b14-466.1-11M4716 (Apple Inc.) 
2015-04-04 21:47:59,762 [     55]   INFO -        #com.intellij.idea.Main - JVM: 20.65-b04-466.1 (Java HotSpot(TM) 64-Bit Server VM) 
2015-04-04 21:47:59,768 [     61]   INFO -        #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseCompressedOops -Djb.vmOptionsFile=/Applications/IntelliJ IDEA 14.app/Contents/bin/idea.vmoptions -Didea.java.redist=NoJavaDistribution -Didea.home.path=/Applications/IntelliJ IDEA 14.app/Contents -Didea.executable=idea -Didea.paths.selector=IntelliJIdea14 
2015-04-04 21:47:59,797 [     90]   INFO -        #com.intellij.idea.Main - JNA library loaded (64-bit) in 29 ms 
2015-04-04 21:47:59,803 [     96]   INFO -        #com.intellij.idea.Main - initializing environment 
2015-04-04 21:47:59,805 [     98]   INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/bash -l -i -c '/Applications/IntelliJ IDEA 14.app/Contents/bin/printenv.py' '/private/var/folders/0c/80mgty691f3bmz1qjmb212440000gn/T/intellij-shell-env0.tmp' 
2015-04-04 21:47:59,846 [    139]   INFO - .intellij.util.EnvironmentUtil - shell environment loaded (21 vars) 
2015-04-04 21:48:03,373 [   3666]   INFO - llij.ide.plugins.PluginManager - 124 plugins initialized in 2191 ms 
2015-04-04 21:48:03,375 [   3668]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), Android Support (10.1.1.0), Ant Support (1.0), Application Servers View (0.2.0), AspectJ Support (1.2), Bytecode Viewer (0.1), CFML Support (3.53), CSS Support, Cloud Foundry integration (1.0), CloudBees integration (1.0), CoffeeScript (2.0), Copyright (8.1), Coverage, Cucumber for Groovy (999.999), Cucumber for Java (999.999), DSM Analysis (1.0.0), Database Tools and SQL (1.0), Eclipse Integration (3.0), EditorConfig (1.0), Emma, Flash/Flex Support (1.0), FreeMarker support (1.0), GWT Support (1.0), Geronimo Integration (1.0), Gherkin (999.999), Git Integration (8.1), GitHub, GlassFish Integration (1.0), Google App Engine Integration (1.1.4), Gradle, Grails (9.0), Groovy (9.0), GuiceyIDEA (8.0), HAML, HTML Tools (2.0), Heroku integration (1.0), Hibernate Support (1.0), I18n for Java, IDEA CORE, IntelliLang (8.0), J2ME (1.0), JBoss Drools Support (1.0), JBoss Integration (1.0), JBoss Seam Pageflow Support (1.0), JBoss Seam Pages Support (1.0), JBoss Seam Support (1.0), JBoss jBPM (2.0.0), JSR45 Integration (1.0), JUnit (1.0), Java Bytecode Decompiler (0.1), Java EE: Batch Applications (1.0), Java EE: Bean Validation Support (1.1), Java EE: Contexts and Dependency Injection (1.1), Java EE: EJB, JPA, Servlets (1.0), Java EE: JMS, JSON Processing, Concurrency, Transaction  (1.0), Java EE: Java Server Faces (2.2.X.), Java EE: RESTful Web Services (JAX-RS) (1.0), Java EE: Web Services (JAX-WS) (1.9), Java EE: WebSockets (1.0), Java Server Pages Integration (1.0), JavaFX (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Jetty Integration (1.0), LESS support, Maven Integration, Maven Integration Extension, OpenShift integration (1.0), Osmorc (1.4.6), Persistence Frameworks Support (1.0), Playframework Support (1.0), Plugin DevKit (1.0), Properties Support, QuirksMode, REST Client, Refactor-X (2.01), Remote Hosts Access (0.1), Resin Integration (8.1), SASS support, SSH Remote Run (0.1), Spring AOP/@AspectJ (1.0), Spring Batch (1.0), Spring Boot (1.0), Spring Data (1.0), Spring Integration Patterns (1.0), Spring MVC (1.0), Spring OSGi (1.0), Spring Roo Console (1.0), Spring Security (1.0), Spring Support (1.0), Spring Web Flow (1.0), Spring Web Services (1.0), Spring WebSocket (1.0), Spy-js (999.999), Struts 1.x (2.0), Struts 2 (1.0), Stylus support (999.999), Tapestry support (1.0), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), Thymeleaf (1.0), Time Tracking (1.0), Tomcat and TomEE Integration (1.0), UI Designer, UML Support (1.0), Vaadin Support (1.0), Velocity support (1.0), W3C Validators (2.0), WebLogic Integration (1.0), WebSphere Integration (1.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, ZKM-Unscramble (1.0), dmServer Support (0.9.5) 
2015-04-04 21:48:03,375 [   3668]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Erlang (0.5.11) 
2015-04-04 21:48:03,375 [   3668]   INFO - llij.ide.plugins.PluginManager - Disabled plugins: CVS Integration (11), ClearCase Integration (2.0), Perforce Integration (2.0), Subversion Integration (1.1), TFS Integration (999.999), hg4idea (10.0) 
2015-04-04 21:48:03,902 [   4195]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=755630080 
2015-04-04 21:48:03,957 [   4250]   INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: /Applications/IntelliJ IDEA 14.app/Contents/bin/fsnotifier 
2015-04-04 21:48:03,984 [   4277]   INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational. 
2015-04-04 21:48:04,964 [   5257]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: [#org.intellij.erlang.debugger.ErlangDebuggerLog] 
2015-04-04 21:48:05,144 [   5437]   INFO -   #com.intellij.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: com.intellij.javaee.heroku.cloud.HerokuBundle 
2015-04-04 21:48:06,142 [   6435]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2015-04-04 21:48:06,163 [   6456]   INFO - ellij.project.impl.ProjectImpl - 20 project components initialized in 275 ms 
2015-04-04 21:48:06,163 [   6456]   INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms 
2015-04-04 21:48:06,899 [   7192]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2015-04-04 21:48:07,122 [   7415]   INFO - pl.stores.ApplicationStoreImpl - 99 application components initialized in 3722 ms 
2015-04-04 21:48:07,135 [   7428]   INFO - .intellij.idea.IdeaApplication - App initialization took 8015 ms 
2015-04-04 21:48:07,268 [   7561]   WARN - om.intellij.util.ProfilingUtil - Profiling agent is not enabled. Add -agentlib:yjpagent to idea.vmoptions if necessary to profile IDEA. 
2015-04-04 21:48:08,026 [   8319]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 21:48:08,029 [   8322]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 21:48:08,062 [   8355]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 21:48:08,066 [   8359]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2015-04-04 21:48:08,077 [   8370]   WARN - rations.RunConfigurationModule - Module serialized more than one time 
2015-04-04 21:48:08,457 [   8750]   INFO - ellij.project.impl.ProjectImpl - 168 project components initialized in 674 ms 
2015-04-04 21:48:08,770 [   9063]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 313 ms 
2015-04-04 21:48:09,093 [   9386]   INFO - dialects.JSLanguageLevelPusher - Pushing ECMAScript 5.1
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DHTML.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DOMTraversalAndRange.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DOMCore.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/E4X.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DOMEvents.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/AJAX.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DOMXPath.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/HTML5.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/EcmaScript5.js
jar:///Applications/IntelliJ IDEA 14.app/Contents/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/EcmaScript.js 
2015-04-04 21:48:09,894 [  10187]   INFO - tartup.impl.StartupManagerImpl - /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source/.idea/misc.xml case-sensitivity: false 
2015-04-04 21:48:09,969 [  10262]   WARN - .ExternalResourceManagerExImpl - Cannot find standard resource. filename:/META-INF/tapestry_5_3.xsd class=class com.intellij.javaee.ResourceRegistrarImpl, classLoader:null 
2015-04-04 21:48:10,103 [  10396]   INFO - ction.BrowserConnectionManager - Browser connected: version 2.0.7, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36 
2015-04-04 21:48:11,923 [  12216]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 2669 ms 
2015-04-04 21:48:12,742 [  13035]   INFO - CompilerWorkspaceConfiguration - Available processors: 8 
2015-04-04 21:48:13,065 [  13358]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 5337 ms 
2015-04-04 21:48:24,021 [  24314]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2015-04-04 21:48:24,397 [  24690]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 
2015-04-04 21:48:25,319 [  25612]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 1303 ms: 0 min 1sec 
2015-04-04 21:48:25,330 [  25623]  DEBUG - ang.debugger.ErlangDebuggerLog - Starting debugger server. 
2015-04-04 21:48:25,332 [  25625]  DEBUG - ang.debugger.ErlangDebuggerLog - Opening a server socket. 
2015-04-04 21:48:25,333 [  25626]  DEBUG - ang.debugger.ErlangDebuggerLog - Listening on port 49583. 
2015-04-04 21:48:25,334 [  25627]  DEBUG - ang.debugger.ErlangDebuggerLog - Preparing to run debug target. 
2015-04-04 21:48:25,335 [  25628]  DEBUG - ang.debugger.ErlangDebuggerLog - Setting up debugger environment. 
2015-04-04 21:48:25,335 [  25628]  DEBUG - ang.debugger.ErlangDebuggerLog - Debugger beams will be put to: /private/var/folders/0c/80mgty691f3bmz1qjmb212440000gn/T/intellij_erlang_debugger_103.tmp 
2015-04-04 21:48:25,337 [  25630]  DEBUG - ang.debugger.ErlangDebuggerLog - Debugger beams were copied successfully. 
2015-04-04 21:48:25,338 [  25631]  DEBUG - ang.debugger.ErlangDebuggerLog - Running debugger process. Command line (platform-independent):  
2015-04-04 21:48:25,338 [  25631]  DEBUG - ang.debugger.ErlangDebuggerLog - /usr/local/lib/erlang/bin/erl -pa /private/var/folders/0c/80mgty691f3bmz1qjmb212440000gn/T/intellij_erlang_debugger_103.tmp -pa /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source/out/production/Erlang-and-OTP-in-Action-Source -pa /Users/liulun/Documents/GitRoot/Erlang-and-OTP-in-Action-Source -run debugnode main 49583 -noshell -s init stop 
2015-04-04 21:48:25,367 [  25660]  DEBUG - ang.debugger.ErlangDebuggerLog - Debugger process started. 
2015-04-04 21:48:25,368 [  25661]  DEBUG - ang.debugger.ErlangDebuggerLog - Initializing local debugging. 
2015-04-04 21:48:25,368 [  25661]  DEBUG - ang.debugger.ErlangDebuggerLog - Entry point: pingpong:run() 
2015-04-04 21:48:25,368 [  25661]  DEBUG - ang.debugger.ErlangDebuggerLog - Debug target should now be running. 
2015-04-04 21:48:25,965 [  26258]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar 
2015-04-04 21:49:19,725 [  80018]   INFO - dvertisement.PluginsAdvertiser - Read timed out 
java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:709)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1218)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
    at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:284)
    at com.intellij.util.io.HttpRequests.access$000(HttpRequests.java:52)
    at com.intellij.util.io.HttpRequests$1RequestImpl.getConnection(HttpRequests.java:142)
    at com.intellij.ide.plugins.RepositoryHelper$1.process(RepositoryHelper.java:129)
    at com.intellij.ide.plugins.RepositoryHelper$1.process(RepositoryHelper.java:122)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:235)
    at com.intellij.util.io.RequestBuilder.connect(RequestBuilder.java:121)
    at com.intellij.ide.plugins.RepositoryHelper.loadPlugins(RepositoryHelper.java:122)
    at com.intellij.ide.plugins.RepositoryHelper.loadPlugins(RepositoryHelper.java:87)
    at com.intellij.ide.plugins.RepositoryHelper.loadPlugins(RepositoryHelper.java:76)
    at com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiser$4$1.run(PluginsAdvertiser.java:245)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
deadok22 commented 9 years ago

So the debug server does start, and it listens on some socket which is open on the wildcard address 0.0.0.0.

The client (the Erlang part of the debugger) attempts to connect to a hostname obtained via the following call: {ok, Host} = inet:gethostname() at server's port and fails with econnrefused (see the actual debugger code here: https://github.com/deadok22/erlang-debug-node/blob/master/src/debugnode.erl) as if there is no server listening at the corresponding address.

I don't know what's going wrong here - it could be your hostname which cannot be used to connect locally. Could you please open two Erlang shells and attempt to establish a tcp connection between them?

Server terminal:

{ok, ListenSocket} = gen_tcp:listen(55566, []).
{ok, Socket} = gen_tcp:accept(ListenSocket).

Client terminal:

{ok, Host} = inet:gethostname().
{ok, Socket} = gen_tcp:connect(Host, 55566, []).

Also, try to ping the hostname you obtain via inet:gethostname() call. Thanks!

Pylipala commented 9 years ago

Here is log: Server:

LundeMac-mini:~ liulun$ erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> {ok, ListenSocket}=gen_tcp:listen(55566, []).
{ok,#Port<0.587>}
2> {ok, Socket}=gen_tcp:accept(ListenSocket).

Client:

LundeMac-mini:~ liulun$ erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> {ok,Host}=inet:gethostname().
{ok,"LundeMac-mini"}
2> {ok,Socket}=gen_tcp:connect(Host,55566,[]).
** exception error: no match of right hand side value {error,econnrefused}
3> 

Ping:

LundeMac-mini:~ liulun$ ping LundeMac-mini 
PING lundemac-mini (180.168.41.175): 56 data bytes
64 bytes from 180.168.41.175: icmp_seq=0 ttl=249 time=2.986 ms
64 bytes from 180.168.41.175: icmp_seq=1 ttl=249 time=3.627 ms
64 bytes from 180.168.41.175: icmp_seq=2 ttl=249 time=3.968 ms
64 bytes from 180.168.41.175: icmp_seq=3 ttl=249 time=2.968 ms
64 bytes from 180.168.41.175: icmp_seq=4 ttl=249 time=3.845 ms
64 bytes from 180.168.41.175: icmp_seq=5 ttl=249 time=3.786 ms
^C
--- lundemac-mini ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.968/3.530/3.968/0.404 ms
LundeMac-mini:~ liulun$ 

Looks strange.

Pylipala commented 9 years ago

Btw, my hosts file looks like below:

LundeMac-mini:~ liulun$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
deadok22 commented 9 years ago

Ok, it looks like LundeMac-mini is resolved to a different machine - that's why we have ping working (Note the 3ms time!). You can run traceroute LundeMac-mini to figure out where does your traffic go.

If it's routed to a different machine, you may want to add an /etc/hosts entry for your machine, or change your host name to something else.

Pylipala commented 9 years ago

I suddenly remember that I immigrated from My mac-mini to Macbook Pro and kept the same name. This should be the root cause of this problem.

I changed my host name and rebooted and I works now. Thanks very much for your help!

deadok22 commented 9 years ago

You're welcome =)