Author Topic: Python Debugger  (Read 49947 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #45 on: September 22, 2012, 01:54:27 am »
quote]
it's good news for using wxJson in CB, it seem not merge in wxWidgets core
I should add these files directly in project!?

For now, yes. I hope to test what you have done so far over the weekend.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #46 on: September 22, 2012, 01:13:24 pm »
I tested briefly last night. No problems compiling. So far, two issues:

1. The debugger always wants to run the same script. (Perhaps this is my fault)
2. On Linux, the target just runs to completion without stopping at a breakpoint and then drops to the gnome terminal. What features are supposed to work?

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #47 on: September 22, 2012, 03:06:49 pm »
I tested briefly last night. No problems compiling. So far, two issues:

1. The debugger always wants to run the same script. (Perhaps this is my fault)
2. On Linux, the target just runs to completion without stopping at a breakpoint and then drops to the gnome terminal. What features are supposed to work?
thanks for your reply,
I attached the patch just for you to review the architecture, I doesn't refine my code yet....
I think current solution is okay for now, but I should wrapper the data structure by json
maybe wait me to modify the code to stable, then I will patch again

The Linux problem, I think it may be the path compare issue, I will prepare Linux environment to test it until I refined my code

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #48 on: October 02, 2012, 11:29:54 am »
Where can I put the xxx.py for PyDebugger to use it?
It need the py file when deubgger run with python
zip file seems only for xrc file

Or just create a folder "PyDebugger" under CB::share/CodeBlocks/plugin when release to general user?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #49 on: October 03, 2012, 02:10:10 am »
Use "extra files"

See here: http://forums.codeblocks.org/index.php/topic,6338.0.html

(I never did finish that wiki page  :-[ )

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #50 on: October 10, 2012, 03:29:17 am »
Dear dmoore,

I had refine my code in new patch
* Fix - Linux breakpoint issue
* Add Debugger setting panel
* Communicate with python debug server in JSON
* Refine watch children mechanism (not perfect yet, update when call stack updated)
* Support thread list
* Run time will read the python files from $(cb)\share\CodeBlocks\python\PyDebugger
* Add update.py for copy python files into devel/output for debugging

[attachment deleted by admin]

[attachment deleted by admin]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #51 on: October 11, 2012, 10:20:39 pm »
Dear dmoore,

I had refine my code in new patch
* Fix - Linux breakpoint issue
* Add Debugger setting panel
* Communicate with python debug server in JSON
* Refine watch children mechanism (not perfect yet, update when call stack updated)
* Support thread list
* Run time will read the python files from $(cb)\share\CodeBlocks\python\PyDebugger
* Add update.py for copy python files into devel/output for debugging

Thanks. I'll try to test it out in the next week or so. Why are there two patch files?

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #52 on: October 13, 2012, 03:47:32 pm »
Thanks. I'll try to test it out in the next week or so. Why are there two patch files?
I had merge local commit in this patch, but file too large(more than maximun attachment), I separate in 2 rar files

[attachment deleted by admin]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #53 on: October 13, 2012, 03:57:42 pm »
Thanks. I'll try to test it out in the next week or so. Why are there two patch files?
I had merge local commit in this patch, but file too large(more than maximun attachment), I separate in 2 rar files

Maybe you should put the code on a public repo?

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #54 on: October 13, 2012, 04:14:09 pm »
Thanks. I'll try to test it out in the next week or so. Why are there two patch files?
I had merge local commit in this patch, but file too large(more than maximun attachment), I separate in 2 rar files

Maybe you should put the code on a public repo?
Do you mean that I create another my own repo to maintain these code?  ???

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #55 on: October 13, 2012, 04:28:11 pm »
Do you mean that I create another my own repo to maintain these code?  ???

Yes, just because it is any easy way to share the code that you are working on. Of course, I will be happy to merge it into mine when you think its ready. Alternatively, you are welcome to use a branch of my Berlios repo if you have an account there. But repos are cheap. Without too much hassle, you can sign up at github or launchpad and get free repo public space that I and others can pull from.

Offline Falldog

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Python Debugger
« Reply #56 on: October 13, 2012, 04:54:54 pm »
Yes, just because it is any easy way to share the code that you are working on. Of course, I will be happy to merge it into mine when you think its ready. Alternatively, you are welcome to use a branch of my Berlios repo if you have an account there. But repos are cheap. Without too much hassle, you can sign up at github or launchpad and get free repo public space that I and others can pull from.

It sounds great! I think I will create a github account to do it. :)

And next step, I think I will try to study wizard script, and create PyDebugger project wizard for save PyDebugger own project
Any suggestion?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: Python Debugger
« Reply #57 on: October 14, 2012, 07:41:03 am »
It sounds great! I think I will create a github account to do it. :)
For the record: I personally prefer SVN repos, because these we can integrate as "external" repo into the C::B repo. This allows the devs to stay independent but us/users to checkout the whole stuff.

At least this is true as long as we stick with SVN.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #58 on: October 14, 2012, 04:43:26 pm »
It sounds great! I think I will create a github account to do it. :)
For the record: I personally prefer SVN repos, because these we can integrate as "external" repo into the C::B repo. This allows the devs to stay independent but us/users to checkout the whole stuff.

At least this is true as long as we stick with SVN.

I plan to merge his stuff when it is ready into my SVN on berlios. In the meantime it is better for him to use *any* repo as opposed to just posting patches here. If you want, Morten, I can setup a python area of my berlios SVN repo (a tidy up of my trunk is long overdue) that C::B can pull from. This would be a combination of several plugins (embedded interpreter, code completion, debugger), but I guess I could combine them into a single C::B project with multiple plugin targets?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Debugger
« Reply #59 on: October 14, 2012, 05:22:51 pm »
Thanks. I'll try to test it out in the next week or so. Why are there two patch files?
I had merge local commit in this patch, but file too large(more than maximun attachment), I separate in 2 rar files

Ok, I briefly tested this one. You should add a post build step to the project to copy the python files to the right place. You also missed XRC file in your zip command on Linux.

BTW, using  wxString rpdb_wrap_path = ConfigManager::GetDataFolder() + _T("/python/PyDebugger/rpdb_wrap.py");, you should test GetDataFolder with true and false. Depending on the setup, the python files could be installed to a global or local place.

I didn't have time to make these fixes myself, but I will take another look later. I did successfully compile the project.
« Last Edit: October 14, 2012, 05:26:11 pm by dmoore »