Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Toggle Breakpoint using SWTBOT(How to toggle a breakpoint on .java file opened at Java Source Editor)
Toggle Breakpoint using SWTBOT [message #922080] Mon, 24 September 2012 14:11 Go to next message
Syamananda Singh is currently offline Syamananda Singh
Messages: 4
Registered: September 2012
Junior Member
Does SWTBOT contain interface to support adding breakpoint on a source editor of Eclipse IDE?

We toggle break-point by right clicking on the left end side source editor.
I can't figure out what exact widget it fall to.

Is there a way to simulate toggle breakpoint in a source editor in SWTBOT ?


Re: Toggle Breakpoint using SWTBOT [message #925021 is a reply to message #922080] Thu, 27 September 2012 06:10 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 745
Registered: July 2009
Location: Grenoble, France
Senior Member
SWTBot is just an API, it is not a debugger.
You can achieve normal debugging when you use SWTBot, and use Eclipse to
Toggle breakpoints and run tests in debug mode.

If you use an external application, you can enable debugging in it using
the standard Java way (using -Xdebug flag & co)
http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html

If you want to debug Tycho surefire tests, simply set the -DdebugPort
system property to the desired value and connect to it with Eclipse as
described in linked article.

HTH
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Toggle Breakpoint using SWTBOT [message #927272 is a reply to message #925021] Sat, 29 September 2012 09:04 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1324
Registered: July 2009
Senior Member
On 09/27/2012 12:10 PM, Mickael Istria wrote:
> SWTBot is just an API, it is not a debugger.
> You can achieve normal debugging when you use SWTBot, and use Eclipse to
> Toggle breakpoints and run tests in debug mode.
>
> If you use an external application, you can enable debugging in it using
> the standard Java way (using -Xdebug flag & co)
> http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html
>
>
> If you want to debug Tycho surefire tests, simply set the -DdebugPort
> system property to the desired value and connect to it with Eclipse as
> described in linked article.

I think he meant (or at least, that's what I'd like to be able to do as
well), how to simulate the setting of a breakpoint in an eclipse editor
at a certain line, in order to test debugging is enabled for that editor...

cheers
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: Toggle Breakpoint using SWTBOT [message #930823 is a reply to message #927272] Tue, 02 October 2012 13:12 Go to previous message
Mickael Istria is currently offline Mickael Istria
Messages: 745
Registered: July 2009
Location: Grenoble, France
Senior Member
On 09/29/2012 03:04 PM, Lorenzo Bettini wrote:
> I think he meant (or at least, that's what I'd like to be able to do as
> well), how to simulate the setting of a breakpoint in an eclipse editor
> at a certain line, in order to test debugging is enabled for that editor...

Ah Ok!
In such case, the best thing is probably to open Java Editor and get it
as a SWTBotEclipseEditor by using toTextEditor, and then "navigateTo"
and then contextMenu.menu("Toggle Breakpoint");

HTH,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:Contrbute to SWTBot using Gerrit
Next Topic:SWTBot code under the Sonar
Goto Forum:
  


Current Time: Sat Aug 30 06:41:52 EDT 2014

Powered by FUDForum. Page generated in 0.01695 seconds