Hi Craig,

On Fri, Oct 24, 2008 at 7:55 AM, Craig Andera <[EMAIL PROTECTED]> wrote:
>
>> Are you doing all of the following:
>>
>> 1. Specify the appropriate debug options when you start Clojure (see
>> step #4 in my blog post)
>
> Yep. Here's the full command line:
>
> c:\WINDOWS\system32\java.exe -Xdebug
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n -cp
> "C:/bin/clojure/clojure/svn/clojure.jar;c:/data/.clojure/*"
> clojure.lang.Repl

No, that's not enough. You didn't specify the port that you want to
connect to JSwat on. add "address=8888" (or something similar) to this
to specify which port you want to use. In my blog example, I'm using
"8888":
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888

>> 2. Load the Clojure source file you want to debug (you can't debug
>> definitions created in the repl)
>
> Did so from the SLIME REPL via (load-file "/path/to/my/source.clj")
>
>> 3. Start JSwat and use the "Session/Attach..." menu option to attach
>> to the correct host/port (in my case, "localhost" and "8888" since I'm
>> debugging a local Java instance and I specified port "8888" when I
>> started Java)
>
> Yep. Localhost and 50525 for me this time (got port from the message
> spewed into *inferior-lisp*).

Port "50525" is the port that SLIME/SWANK is using to establish the
communications between your running Clojure instance and the emacs
lisp code. You can't use this same port for JSwat.

>> 4. In JSwat, open the same Clojure source file you loaded in step #2
>> and add a breakpoint (you can just click on the source line#) - note
>> that you can only add breakpoints to lines in a defn, not lines in a
>> defmacro definition
>
> Yep.
>
>> 5. In the Clojure repl evaluate a form that will call the function
>> that has your breakpoint.
>
> Yep.
>
>> 6. In JSwat, you should see that the breakpoint has been hit and
>> program execution is paused
>
> Nope. :p
>
> Fortunately I've since solved the problem I originally wanted the
> debugger for (yay REPL), but it still would be nice to get this to
> work...

If you do the above, it should work for you.

> I'm puzzled by my ability to successfully hit breakpoints in boot.clj.
> That seems to imply I'm doing something partially right.

--
Bill Clementson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to