Home Download Buy Blog Forum Support

Debuging

Re: Debuging

Postby quarnster on Wed Jun 27, 2012 3:26 pm

I made some small tweaks in the plugin and was able to set a watch for i now. This should also list variables in the variables view where possible. The file_1 variable refused to show up for some reason though. Try updating the plugin to the latest code and see if that works better for you.

The "No symbol ... in current context." usually means that you are trying to set a watch where the variable isn't defined. To watch i you have to set a breakpoint on the print statement and once that breakpoint is hit, you can add a watch for i.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Debuging

Postby dbabo on Wed Jun 27, 2012 3:29 pm

quarnster wrote:I made some small tweaks in the plugin and was able to set a watch for i now. This should also list variables in the variables view where possible. The file_1 variable refused to show up for some reason though. Try updating the plugin to the latest code and see if that works better for you.

The "No symbol ... in current context." usually means that you are trying to set a watch where the variable isn't defined. To watch i you have to set a breakpoint on the print statement and once that breakpoint is hit, you can add a watch for i.


Awesome! Let me try right now...

BTW. I saw in your comments that you were not able to figure out how to set a new breakpoint while debugging. The author of LiteIde got it to work - i just tested it. So you may want to contact him.
dbabo
 
Posts: 25
Joined: Tue Jun 26, 2012 1:47 pm

Re: Debuging

Postby dbabo on Wed Jun 27, 2012 4:04 pm

quarnster wrote:I made some small tweaks in the plugin and was able to set a watch for i now. This should also list variables in the variables view where possible. The file_1 variable refused to show up for some reason though. Try updating the plugin to the latest code and see if that works better for you.

The "No symbol ... in current context." usually means that you are trying to set a watch where the variable isn't defined. To watch i you have to set a breakpoint on the print statement and once that breakpoint is hit, you can add a watch for i.


good news indeed!
i could see "i" now.
now i made a change to the code - in the loop i print the const ( F_name1).
But i can't see it in the variables window.

Also - how can i remove the var from the watch window?

Code: Select all

func main() {

   file_1, err := os.Open(F_name1)
   if err != nil {
      fmt.Println(err)
   }
   for i := 0; i < 10; i++ {
      println(i)
      println(F_name1)

   }

}
dbabo
 
Posts: 25
Joined: Tue Jun 26, 2012 1:47 pm

Re: Debuging

Postby quarnster on Wed Jun 27, 2012 4:27 pm

Remove by pressing F9 with the cursor on the line in the breakpoint/watch window.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Debuging

Postby dbabo on Wed Jun 27, 2012 4:42 pm

quarnster wrote:Remove by pressing F9 with the cursor on the line in the breakpoint/watch window.


cool. how about the F_name1 problem?
dbabo
 
Posts: 25
Joined: Tue Jun 26, 2012 1:47 pm

Re: Debuging

Postby quarnster on Wed Jun 27, 2012 5:31 pm

dbabo wrote:how about the F_name1 problem?

Like I said earlier:
quarnster wrote:This should also list variables in the variables view where possible.


If it's not listed, it wasn't possible to create a gdb variable for it. Feel free to submit a pull request when you figure out what needs to be changed.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Debuging

Postby dbabo on Thu Jun 28, 2012 6:39 pm

quarnster wrote:
dbabo wrote:how about the F_name1 problem?

Like I said earlier:
quarnster wrote:This should also list variables in the variables view where possible.


If it's not listed, it wasn't possible to create a gdb variable for it. Feel free to submit a pull request when you figure out what needs to be changed.


i don't know why but i can't fish the value of constant from gdb.
quamster - thank you for the earlier fix. Life is good now :)
dbabo
 
Posts: 25
Joined: Tue Jun 26, 2012 1:47 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 12 guests