Debugging fitnesse

48 views
Skip to first unread message

Andy

unread,
Aug 12, 2009, 7:11:55 AM8/12/09
to jswat-discuss
Hi

I'm using JSwat to debug fitnesse by attaching to the fitnesse host -
so far so good.

I can set breakpoints and execution stops there. I can examine the
content of variables by hovering the mouse over them.

However, the JSwat editor never indicates the 'current' line in the
source code and the Variables panel always reports 'Current Thread is
not set'.

Any ideas about resolving these issues?

Nathan Fiedler

unread,
Aug 12, 2009, 9:42:10 AM8/12/09
to jswat-...@googlegroups.com
Sounds like the current thread did not get set properly and thus most
features will simply not work. I can't recall ever seeing this happen
before, so I'd like to know what versions of everything you're using
so I can try reproducing it. In particular, what versions of JSwat,
JDK, FitNesse, and operating system are you using?

One thing you can try is to open the Threads view and double-click on
a suspended thread, you should see the other views show something
reasonable (e.g. a stack trace in the call stack, variables in the
variables view, etc).

n

Andy

unread,
Aug 12, 2009, 9:51:59 AM8/12/09
to jswat-discuss
Here's my settings:

Product Version: JSwat 4.5
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (jswat)
Userdir: C:\Documents and Settings\abell\.jswat
Fitnesse: Release 20080812

There are no threads listed in the threads view :-(

I've only just installed JSwat (looking for a lighter weight tool than
Eclipse) and, possibly, something didn't configure correctly?

Andy

Nathan Fiedler

unread,
Aug 15, 2009, 2:55:46 AM8/15/09
to jswat-...@googlegroups.com
I am able to reproduce the problem, and it's actually caused by a bug
that I encountered earlier today. If JSwat attempts to locate a source
file and is unable to find it, it throws an exception (you'll see a
little red icon in the bottom right corner of the JSwat window). This
can happen when you try to set the current thread or stack frame, at
which point JSwat tries to show the program counter for the current
location.

I've fixed the code, but there are other bugs to fix before I can make
a release. In the mean time, try to set the sourcepath to include
whatever it might be that JSwat is looking for.

Sorry for the inconvenience.

n

Mark Petrovic

unread,
Nov 12, 2012, 1:39:08 PM11/12/12
to jswat-...@googlegroups.com
I am seeing similar effects, characterized by "Current thread is not set" when I stop at a breakpoint in application code and click on the Variables tab.  Interestingly, the value of in scope variables is available as a hover-over tool-tip when I hover over those values in the Sources source code view.  The Evaluator also works.

My system:

Mac:

- OS X 10.7.5

Java: 

java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

jswat:

Product Version: JSwat 4.5

Java: 1.6.0_37; Java HotSpot(TM) 64-Bit Server VM 20.12-b01-434

System: Mac OS X version 10.7.5 running on x86_64; MacRoman; en_US (jswat)

Userdir: /Users/petrovic/.jswat

       

The application I'm debugging is a simple Jersey JAX-RS web app running under Tomcat v7.0.27.  I invoke jswat like this:

$ sh ~/tools/jswat/bin/jswat --open ~/thin-debugger-client/theapp/src/main/java/theapp/SimpleResource.java:23

I'm attaching a screenshot of jswat as seen when the webapp is stopped at a breakpoint.  I also expected the thread servicing the HTTP request to be shown as "suspended", but it shows "Running".  

I'll be working with jswat and this sample webapp for a few more days - please let me know if I can provide more information about the state of the app and my use of jswat.

Thanks.
jswat-current-thread.png
Reply all
Reply to author
Forward
0 new messages