ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
[HowTo] Debug CP source live as web application
Added by Chili Fan at 2012-08-08 11:02 pm
Hello
I don't know if it is possilbe to debug CP deployed on tomcat, At the moment i have CP all source files deployed on tomcat,
then i have installed Eclipse JavaEE, i setup an debug configuration with Tomcat support directly onto webapps folder,
Next at the Eclipse i am able to hit Debug button i see CP get launched and can be access at my localhost at browser
Now i would like to set a breakpoint within a .rb file but i only can set Bookmark
Now i am stuck maybe Breakpoint support for .rb is unsupported for Eclipse i wished i could debug CP
for example set break point at line "def new..." controller project.rb and when i push new project at webpage the debugger should halt
maybe it not possible by Eclipse for breakpoint support rb files, due it view is all plain text no highlighting of code which i noticed in file view
maybe someone is able to debug CP under tomcat, i also nbproject folder i guess this is netbeans which i have too
i could give it a try to load this project and see if CP can be debugged at localhost from netbeans instead of using eclipse
Thanks in advance
Replies (14)
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-08 11:53 pm
Update
I installed ruby development tool from help install new software select juno site and then filter on ruyby, now ruby and breakpoint is supported at eclipse JavaEE 1722 Nice, i setup Server which i can launch by hit debug button then hit register at CP webpage but debugger is not halted at the breakpoint of def register line in account controller.rb
i see i need debug configuration for java application or ruby application to be setup i give it a try, i am one step futher see if i can make it break at eclipse
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-11 12:00 am
Update
At eclipse seem attach mode and listen mode interaction are working
with standalone tomcat when setup tomcat correctly before perfom the addiotional steps to get Debug running at eclipse
Also i give build in tomcat at eclipse a try with same result i am able to get atach and liste mode running as Debug at eclipse
This is nice but still un able to get Halt stop at a breakpoint within eclipse
At breakpoints View there is a knob button "Show breakpoints supported by selected target" when Activate this one the Shown breakpoint disapears looks like this could something be involved why no Halt at breakpoint is seen don't know what valid breakpoints are ?
I know this is off topic related for CP point of view
but if i can get Debugger running at Eclipse and Tomcat this would contribute for CP development
Thanks
RE: [HowTo] Debug CP source live as web application - Added by Felix Schäfer at 2012-08-12 04:00 pm
Chili Fan wrote:
I know this is off topic related for CP point of view
but if i can get Debugger running at Eclipse and Tomcat this would contribute for CP development
I think none of the current devs uses Eclipse and/or a java/jvm-based setup to develop or run ChiliProject, I'm afraid we can't help much, sorry.
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-12 04:03 pm
For now i stuck at Eclipse still no halt at an breakpoint, i use attach debug after first start tomcat in debug mode
by Eclipse through perform Run or manually start service (both passing same debug arguments to launch tomcat in debug mode)
Next hit Debug the debbuger attach went fine and all thread is running
I installed both jre and jdk of java maybe i should install java-ee jre and jdk to get the breakpoint working
Thanks for anyone would could give a pointer (or use other kind of IDE to debug CP ?)
@Felix,
Thanks for reply i now read your message after my post
Okay i understand most are at Linux, i think the concept of debug CP is possible in global meaning,
i try to make it possible for windows and let know my progress
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-16 10:43 pm
Just for reference
I face still trouble that a breakpoint never gets reached, on tomcat and attach debug went fine
at eclipse, this url describe the same effect http://devnet.jetbrains.net/message/5463888?tstart=0
Maybe pointers can be found at those i need to look through them
http://eclipse.sys-con.com/node/44918
http://cocoon.apache.org/2.1/faq/faq-debugging.html
http://forums.netbeans.org/topic15855.html
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-17 10:27 pm
Anyone at Windows and tomcat interested to help or try to get debug chiliproject working ?
At eclipse i can connect debugger to the tomcat which i have started in debug althoug i think it is running debug mode,
don't know how to verify this by port monitor maybe to see traffic, eventually the breakpoint at controller login user won't halt
and breakpoint seems unsupported when hit that supported breakpoint button view at eclipse,
debugger is running but never stops at a breakpoint
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-18 06:53 pm
Should i have addtional gems installed with CP to get debug work at a deployed CP?
Should i select fast debugger within eclipse or other debugger?
Should i try with WEBrick first to get debug work within eclipse and then give tomcat a try?
Should i use development environment for CP instead of using production?
How do i lauch WEBrick in debug mode?
Thanks
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-19 12:22 pm
How do i launch WEBrick in debug mode?
Open command prompt from folder "chiliproject" (rubyinstaller-1.9.3-p194 is used for CP) Edit At root:\rootchili\chiliproject File Gemfile Add gem "ruby-debug", "~> 0.10.4" Add gem "ruby-debug-ide", "~> 0.4.16" Perform "root:\rootchili\jruby\bin\jruby" -S gem update --system Perform "root:\rootchili\jruby\bin\jruby" -S gem install bundler Perform "root:\rootchili\jruby\bin\jruby" -S bundle install --without=mysql mysql2 postgres rmagick thin Perform "root:\rootchili\jruby\bin\jruby" -S script/server -p 3000 -e production RAILS_ENV=production --debugger CheckAt http://localhost:3000/ Perform "Server Stop"This Works, i guess i should perform Debug Attach in Eclipse,
to this WEBrick running in debug mode to get started debugging of CP in eclipse i think
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-25 03:00 pm
Can someone let know if it even Possible to Remote debug (develop) ChiliProject code ?
And if possible which steps should i take to get Remote debug working
Currently i would like use Windows but i can switch to Linux if needed
OffTopic
Maybe usefull for ChiliProject code base aswell Refactoring-redmine
http://theadmin.org/refactoring-redmine/
RE: [HowTo] Debug CP source live as web application - Added by Felix Schäfer at 2012-08-26 09:13 am
Chili Fan wrote:
Can someone let know if it even Possible to Remote debug (develop) ChiliProject code ?
And if possible which steps should i take to get Remote debug working
That's really a problem of the interpreter (which ruby you use) rather than ChiliProject. AFAIK Java has remote debugging support, if the JRuby debugging is built on the Java debugging it's probably possible.
Regarding vanilla ruby, it seems to be possible according to this StackOverflow thread, I've never used it so I can't really help you. Passenger seems to support or will support in an upcoming version something similar, see the live debugging console, AFAIK Passenger only works on unix system though.
Regarding other interpreters: I think Rubinius supports remote debugging, I couldn't find anything on the quick though, and I think CP doesn't run (well) there. MagLev probably also supports remote debugging because of the language VM it's built on, but from the little I've heard CP won't run there either.
In-process debugging of ChiliProject (at least on vanilla ruby and on unix) is pretty easy though, so you might think about if you really need the remote part or not.
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-08-26 04:56 pm
Felix Schäfer wrote:
That's really a problem of the interpreter (which ruby you use) rather than ChiliProject. AFAIK Java has remote debugging support, if the JRuby debugging is built on the Java debugging it's probably possible.
Thanks for all answer, i don´t know if i need Remote, but i would like to debug a deployed CP at my web browser and halt code on a breakpoint to see things working, maybe it is due my web browser causing i won't halt a breakpoint, for jruby and eclipse and tomcat i think i have almost a working debug due they interact eclipse and tomcat, when pause run stop the debugger "only" it won't halt or stop at breakpoint
i keep try (maybe other enviroment) and let know
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-09-10 10:50 pm
Hello Felix
Is it possible to give a "few" steps (from CP devs) basically how to develop/debug CP in unix/linux using remote or i mean localhost ?
i think i got webrick running in debug mode but eclipse does not halt on a breakpoint, now i would like to give linux road a try for develop
I just found this nice Common tutorial of ruby debug, would be great if this can be done at Eclipse for CP,
but could be a nice start to try debug of CP http://railscasts.com/episodes/54-debugging-with-ruby-debug
I go ReTry Netbeans after founding this one, i just should be possible some how on windows :)
http://manish-chaks.livejournal.com/104842.html
https://github.com/jruby/jruby/wiki/UsingTheJRubyDebugger
http://mysterycoder.blogspot.nl/2007/10/debugging-jruby-on-rails-app-with-jruby.html
RE: [HowTo] Debug CP source live as web application - Added by Felix Schäfer at 2012-09-19 11:55 am
Debugging when run on MRI (vanilla ruby) is pretty much:
- install the ruby-debug gem and add the gem to your gemfile (preferably the Gemfile.local),
- add a debugger
statement where you want to step through,
- start your server in development mode and make a request, the server will then halt at the point with the debugger
.
RE: [HowTo] Debug CP source live as web application - Added by Chili Fan at 2012-09-21 06:38 pm
I will look into basic steps you mention about install and add gem...
OffTopic Felix about gems i realize i used and earlier version of acts-as-taggable-on
if remember correct or other gem to get tomcat and CP to work
see my gem list adjustment over here
https://www.chiliproject.org/boards/1/topics/1420?r=2044#message-2044
maybe is helpfull to use in a futher release of CP
(1-14/14)