Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to setup stepping(?) so I can see what code is executing when.(Stepping, step-through, is that the term...?)
How to setup stepping(?) so I can see what code is executing when. [message #986065] Sun, 18 November 2012 05:29 Go to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
Hi all,

Yes newbie here.

Anyway recently I've encountered some problems coding and would like to know whether I can activate this stepping option. Or what I perceive is known as stepping. Which is I want to see the code that is executing highlighted so I know in what order it is executing the code and how it is interacting with each other.

Now I'm stuck using Eclipse HElios 3.2 as it is part of the Stanford course I'm doing and has the Stanford libraries installed automatically. So yeah just a heads up there.

Anyway any help is appreciated.

Thanks Powermaniac.
Re: How to setup stepping(?) so I can see what code is executing when. [message #986108 is a reply to message #986065] Sun, 18 November 2012 22:45 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3189
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 11/18/2012 11:55 AM, Powermaniac ... wrote:
> Hi all,
>
> Yes newbie here.
>
> Anyway recently I've encountered some problems coding and would like to
> know whether I can activate this stepping option. Or what I perceive is
> known as stepping. Which is I want to see the code that is executing
> highlighted so I know in what order it is executing the code and how it
> is interacting with each other.
> Now I'm stuck using Eclipse HElios 3.2 as it is part of the Stanford
> course I'm doing and has the Stanford libraries installed automatically.
> So yeah just a heads up there.
>
> Anyway any help is appreciated.
> Thanks Powermaniac.

Helios is a aging, but very rock-solid release of Eclipse;you will NOT
be disappointed.

You can single step through your code with each line highlighted as you
do it. That's very basic Eclipse debugger functionality. If you wanted
to step through code that doesn't belong to you, that's a little more
difficult, but doable for the most part.
Re: How to setup stepping(?) so I can see what code is executing when. [message #986124 is a reply to message #986108] Mon, 19 November 2012 05:27 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
How do I do this though. Sorry I may not have made that clear. I'm not actually sure how you do this. Where is the option located? Do I need it setup in a particular way? How do I use the debugger?
Re: How to setup stepping(?) so I can see what code is executing when. [message #986126 is a reply to message #986124] Mon, 19 November 2012 05:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26048
Registered: July 2009
Senior Member
Have you consulted Google? You'd find tutorials like this one:

http://www.vogella.com/articles/EclipseDebugging/article.html


On 19/11/2012 6:27 AM, Powermaniac ... wrote:
> How do I do this though. Sorry I may not have made that clear. I'm not
> actually sure how you do this. Where is the option located? Do I need
> it setup in a particular way? How do I use the debugger?
Re: How to setup stepping(?) so I can see what code is executing when. [message #986127 is a reply to message #986126] Mon, 19 November 2012 05:59 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
That doesn't work for me. It goes to debug mode and I run the code and then it gets to the breakpoints and stops.

Now my normal editor perspective has screwed up. Happened before but I've got to remember how I fixed it =\...
Re: How to setup stepping(?) so I can see what code is executing when. [message #986128 is a reply to message #986127] Mon, 19 November 2012 06:06 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
Fixed the normal perspective had to delete the metadata and re-import my project.

But yeah whenever I run the debugger it doesn't do anything and when I go back to the editor perspective I get this:

"Could not create the view: Plug-in "edu.purdue.penumbra" was unable to instantiate class "edu.purdue.penumbra.editor.ui.PenumbraPackageExplorer"

And then a HUGE details log of what is wrong.

java.lang.VerifyError: class edu.purdue.penumbra.editor.ui.PenumbraPackageExplorer$PackageExplorerProblemTreeViewer overrides final method getFilteredChildren.(Ljava/lang/Object;)[Ljava/lang/Object;
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:259)
	at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:327)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:647)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:574)
	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
	at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
	at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3614)
	at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:1041)
	at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:1025)
	at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3715)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3713)
	at edu.purdue.penumbra.editor.ui.actions.PenumbraSwitchPerspectiveAction.run(PenumbraSwitchPerspectiveAction.java:35)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: How to setup stepping(?) so I can see what code is executing when. [message #986240 is a reply to message #986128] Mon, 19 November 2012 15:10 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/19/2012 12:06 AM, Powermaniac ... wrote:
> Fixed the normal perspective had to delete the metadata and re-import my
> project.
> But yeah whenever I run the debugger it doesn't do anything and when I
> go back to the editor perspective I get this:
>
> "Could not create the view: Plug-in "edu.purdue.penumbra" was unable to
> instantiate class "edu.purdue.penumbra.editor.ui.PenumbraPackageExplorer"
>
> And then a HUGE details log of what is wrong.
>
> java.lang.VerifyError: class
> edu.purdue.penumbra.editor.ui.PenumbraPackageExplorer$PackageExplorerProblemTreeViewer
> overrides final method
> getFilteredChildren.(Ljava/lang/Object;)[Ljava/lang/Object;
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at

You appear to have a third party package installed. Searching the web
for PenumbraPackageExplorer produces references to a project that once
was hosted by Purdue university. However, the links appear to no longer
work. This plugin appears to not be compatible with the version of
Eclipse that you are running.

How did you install this plugin? You need to see if you can find an
updated version or you will need to uninstall it.

I would start with a clean version of Eclipse and not install this
plugin since it seems to be interfering with debugging.
Re: How to setup stepping(?) so I can see what code is executing when. [message #986338 is a reply to message #986240] Tue, 20 November 2012 07:05 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
David Wegener wrote on Mon, 19 November 2012 10:10

You appear to have a third party package installed. Searching the web
for PenumbraPackageExplorer produces references to a project that once
was hosted by Purdue university. However, the links appear to no longer
work. This plugin appears to not be compatible with the version of
Eclipse that you are running.

How did you install this plugin? You need to see if you can find an
updated version or you will need to uninstall it.

I would start with a clean version of Eclipse and not install this
plugin since it seems to be interfering with debugging.


The plugin came pre-installed with the version of Eclipse I installed. This is because I'm using there modified version of Eclipse that is provided for the course. As it is needed for the introductory assignments. There is no updated version available just what comes pre-installed.

How do I uninstall it? I shall try Googling it and hopefully I find something otherwise any instructions as to how I uninstall a plugin would be great.

I need to keep this version of Eclipse because of the other plugins that I need that it contains that I can't get else where.

Thanks, Powermaniac.

I just deleted it following these instructions: http://wiki.eclipse.org/FAQ_How_do_I_remove_a_plug-in%3F

Fingers crossed it works.

[Updated on: Tue, 20 November 2012 07:11]

Report message to a moderator

Re: How to setup stepping(?) so I can see what code is executing when. [message #986342 is a reply to message #986338] Tue, 20 November 2012 07:14 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
Okay deleting that file renders my code useless as I know longer have the karel and SuperKarel libraries...Thus I had to undelete it to get it to run the program again...

=\

Update: So I reinstalled the version of Java and the Eclipse that Stanford provides. I no longer get the Penumbra error. Instead though nothing seems to happen when I debug.

I tried following the guide in the link above and it gets me no where. It just doesn't work with the F5, F6, F7, F8 keys. And I'm not even sure what is supposed to happen. As the stepping doesn't seem to occur at all.

So...?

[Updated on: Tue, 20 November 2012 09:44]

Report message to a moderator

Re: How to setup stepping(?) so I can see what code is executing when. [message #986459 is a reply to message #986342] Tue, 20 November 2012 14:17 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3189
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 11/20/2012 12:14 AM, Powermaniac ... wrote:
> Okay deleting that file renders my code useless as I know longer have
> the karel and SuperKarel libraries...Thus I had to undelete it to get it
> to run the program again...
>
> =\

So, what you're saying is that you can't just download and install
Eclipse for that course without using (what appears to be) a broken,
unmaintained auxiliary package? What are others in the course doing?
Re: How to setup stepping(?) so I can see what code is executing when. [message #986466 is a reply to message #986342] Tue, 20 November 2012 14:41 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/20/2012 01:14 AM, Powermaniac ... wrote:
> Okay deleting that file renders my code useless as I know longer have
> the karel and SuperKarel libraries...Thus I had to undelete it to get it
> to run the program again...
>
> =\
Unfortunately, you probably won't be able to get much help in the
Eclipse forums. From what I've been able to learn about Karel, it
appears to be something developed by Stanford University for some of
their online courses. It was developed on top of Eclipse, but not by
the Eclipse developers. The people answering questions in this forum
aren't likely to know much about the product.

You could try contacting the instructor of the course to ask about
support for the tool.
Re: How to setup stepping(?) so I can see what code is executing when. [message #986576 is a reply to message #986459] Wed, 21 November 2012 02:39 Go to previous messageGo to next message
Powermaniac ... is currently offline Powermaniac ...
Messages: 7
Registered: November 2012
Junior Member
Russell Bateman wrote on Tue, 20 November 2012 09:17

So, what you're saying is that you can't just download and install
Eclipse for that course without using (what appears to be) a broken,
unmaintained auxiliary package? What are others in the course doing?


I've fixed the problem with the broken, unmaintained auxiliary package. I thought I already mentioned that. Sorry.

I just re-downloaded the eclipse from the Stanford site, re-download the JRE they are using. Delete my current version of Eclipse while saving my work folders. Reinstalled Eclipse and the JRE and put my work folders back. And now I'm no longer getting the Penumbra error.

But instead nothing seems to happen when I run the debugger. I'm not even sure what is meant to happen. As no highlighting of the code occurs as I run it. And the F5, F6, F7, F8 keys don't do anything or don't seem to.

Basically I'm rather confused what the debugger is meant to be doing.

David Wegener wrote on Tue, 20 November 2012 09:41

Unfortunately, you probably won't be able to get much help in the
Eclipse forums. From what I've been able to learn about Karel, it
appears to be something developed by Stanford University for some of
their online courses. It was developed on top of Eclipse, but not by
the Eclipse developers. The people answering questions in this forum
aren't likely to know much about the product.

You could try contacting the instructor of the course to ask about
support for the tool.


Okay thanks anyway. I will try contacting the instructor.

Thanks again and sorry for wasting your time.

Powermaniac.

[Updated on: Tue, 18 June 2013 10:33]

Report message to a moderator

Re: How to setup stepping(?) so I can see what code is executing when. [message #986772 is a reply to message #986576] Wed, 21 November 2012 15:19 Go to previous message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/20/2012 08:39 PM, Powermaniac ... wrote:
> Russell Bateman wrote on Tue, 20 November 2012 09:17
>> So, what you're saying is that you can't just download and install
>> Eclipse for that course without using (what appears to be) a broken,
>> unmaintained auxiliary package? What are others in the course doing?
>
>
> I've fixed the problem with the brokne, unmaintained auxiliary package.
> I thought I already mentioned that. Sorry.
>
> I just re-downloaded the eclipse from the Stanford site, re-download the
> JRE they are using. Delete my current version of Eclipse while saving my
> work folders. Reinstalled Eclipse and the JRE and put my work folders
> back. And now I'm no longer getting the Penumbra error.
>
> But instead nothing seems to happen when I run the debugger. I'm not
> even sure what is meant to happen. As no highlighting of the code occurs
> as I run it. And the F5, F6, F7, F8 keys don't do anything or don't seem
> to.
> Basically I'm rather confused what the debugger is meant to be doing.
Again, Karel is a Stanford product. We don't know what their debugger
does or how to use it. Your best bet is to consult the Stanford site
for their support options and ask there.
Previous Topic:Eclipse icons image file types allowed
Next Topic:Eclipse suddenly refuses to open
Goto Forum:
  


Current Time: Wed Sep 17 23:47:53 GMT 2014

Powered by FUDForum. Page generated in 0.01998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software