Hey

This might sound like a dumb question but I simply dont know how to do it. Not only that but for some reason I do not know, my professor refuses to teach me how to use debugging and watch variables. He wants the "change, try, and test" method....

I think debugging is alot better so I wish someone could help me.

In the IDE, I load up my project and have a variable under

public class Main extends Frame {

simple declared as:

byte x=1;

I hit the Debug menu then New Watch...

In the window I simply enter x and the Variables windows shows with under the column Name and variable I just put which is x.

I hit Debug Project and where it says Value it says >No current context (stack frame)<

How can I view the value of this variable while Im debugging the program? I debug the program like normal (the value of this variable is at one time or another modified while Im debugging the program) but the column Value always shows the same thing.

Thank you

Recommended Answers

All 2 Replies

Setting a "watch" is a function of the Debugger the IDE uses, so read the IDEs documentation.

Setting a "watch" is a function of the Debugger the IDE uses, so read the IDEs documentation.

I searched around but did not see anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.