Debug rhodes framework - eclipse

I'm newbie to ruby and rhomobile.
I'm debuggind succesffuly using the simulator, I can set breakpoints, etc... All works fine except I can't debug inside the framework code.
How can I debug through the framework code in a rhomobile app? How can I configure rho studio so I can debug inside the framework?
I'm a newbie with ruby and eclipse.
More detailed:
My problem happens when I try to debug functions inside the framework. For example: I put a breakpoint in a model.find(:all). The debugger stops here, but when I want to debug then find method it doesn't enters it, it simply executes and continues in the next instruction. In keys terms, I want to make a step into, but it makes a step over. If it helps you, in edit mode, when I press control+left mouse button over a "Rho::RhoController" in a line like this: "class TestController < Rho::RhoController", it doesn't open /rhodes-3.2.1/lib/framework/rho/rhocontroller.rb, where the source code of this class is.

First you need to install rhostudio, once ure done with that. You need to run your application through Rhosimulator which is a really fast simulator than native blackberry, android & ios simulators.
Please follow these steps :
Select Run » Debug Configurations… from top menu
Find ‘Rhodes Application’ section on the left and add new (or modify existing) configuration
On ‘Common setting’ tab select a project by clicking ‘Browse…’ button next to ‘Project name:’
Select ‘Rho simulator’ as the platform
Click ‘Apply’ and then ‘Debug’
Its good that you have already added breakpoints in your .rb files which you can now view in log in Console window.

Related

Troubleshooting on device with Titanium for iPhone

On Xcode when you build on device you can troubleshoot the app within the console. How can i do that with Titanium? It's very difficult without troubleshooting
What you can do is use the Ti.API.info('whatever') method to log everything you need and will help in debugging then while you run your app on the device and it is connected to your computer, just open xcode -> go to organizer -> click on your device -> and select console. Every Ti.API.info() log you do in your app will show up in the console.
Titanium's SDK (http://www.appcelerator.com/platform/titanium-sdk) is Eclipse with the Aptana plug-in. You can do the same debugging you'd do in Eclipse: set break points, step through code, set watch points, ...
To run your app in debug mode, start by setting some break points in your app. To do that right-click on the line number that's on the far left of our line of code and select "Toggle Breakpoint". Next, towards the top of the Project Explorer panel are several icons. One of them is debug. Click on that debug's dropdown menu and select the iphone emulator or ipad emulator. The app will compile for debug and run the emulator you chose. From this point on, everything is like debugging on Eclipse.

complete debugging in xcode 4.2

I am using xcod 4.2 now and its not showing the complete debug information if my application crashes. i was using xcode 3.5 earlier which shows the complete crash stack.
Is there any option to activate this option please update me?
I highly recommend this setting in the Behaviors tab of Xcode preferences:
. Create a new tab in your workspace window and rename it "Console" by double-clicking on its title.
Now when a run of your application starts, the debugger view will automatically display.
It's displayed in the console. There's a toggle at the top (near the organizer icon) to display the console, variables, or both.
If you want to see the call stack in the console . . . well you can't, it seems, but you can set a break point for all exceptions by opening the breakpoints navigator and hitting the plus button then selecing exception breakpoint.
It's not great but it should help.

Running my program from PyDev with one click?

I am developing using the PyDev plugin in Eclipse. My program uses several classes in several files. I usually run the program using the green "play" icon or using Control+F11. The only problem is that it will run the file, which is currently in "focus". Usually this is not the one containing the starting point of my application. As I run my program something like 200 times a day, this means that I need 200 extra click on the mouse and often forget about this.
Is there any way of setting the default file to launch?
Yes, change the launching to rerun the last launched, so Ctrl+F11 will launch the last one -- and use F9 to launch the one with focus -- See instructions and details at: http://pydev.org/manual_101_run.html
For me, the shortcut is Ctrl+Shift+F9. I don't think I've changed any keybindings, so its strange that it would be different from the official documentation.
Go to Run->Run History, and select the run that is your 'main' run. Now you should be able to use Ctrl-Shift+F9 from any other file to rerun your main. If it isn't Ctrl+Shift+F9 for you, look on the console window that should be at the bottom of your screen showing the stdout after every run. There is an icon on the top of it that has the green start arrow with a yellow arrow underneath it pointing to the right. That is the command to relaunch with the same configuration. If you hover over that, it should tell you the keyboard shortcut you need.

Opening Xcode help file and application at the same time

I am noobs at Xcode. I am on my second day of learning.
When I start Xcode, the main window has a button for "Getting Started with Xcode" and a subsequent link for "Xcode workflow tutorial"
Now I would simply like the help to be open at the same time as the IDE so that I can read and code. I clicked on the Xcode icon that opened up the original instance, but that doesn't seem to do anything.
How do I get both things to stay open at the same time?
Follow these steps -
Step 1: On opening X-Code, this window turns up-
Step 2: On clicking Getting started with Xcode , gives -
Step 3: On clicking Start Developing with Xcode gives-
Step 4: On clicking the link - Xcode Workflow tutorial present in Write a Sample Application gives-
Notice that in all the process your Xcode menubar remains unchanged i.e.,
Now, Click on File(or Cmd + Shift + N keyboard shortcut) , and select New Project should pop up the windows as shown in Workflow tutorial. Select the application type, saving should bring you new Xcode project. Arranging the two windows side by side should look some what like this -
Now code while you learn from the Workflow tutorial :)
Hope this is helpful.
You can open the documentation window via Cmd-Option-? and search for Getting Started with Xcode there. The option to open the documentation is also under the Help menu.
I generally open a project first and then open the documentation afterwards, if necessary.

Modifying Running Code in Xcode Fix (found in the 'Run' menu)

I am attempting to use the 'Fix' command found in the 'Run' menu in Xcode to modify my running code without having to rebuild. I have read apple's documentation on it but following their
'typical fix-and-continue workflow:' (http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/XcodeDebugging/230-Modifying_Running_Code/modifying_running_code.html) doesn't seem to be working for me...
Here is what i am doing (from scratch):
- create view-based project in Xcode
- create click event to trigger a function that just logs some output
- run in simulator with debugger (command-Y)
- click 'pause' in the debugger.
- add another log (or some other simple change) to the function
- save modified code
- select 'Fix' from the 'Run' menu
- click continue and click button
The added log doesn't appear...
Not an answer, per se, but this "Fix and continue" system is disappearing in XCode 4. I wouldn't invest a lot of time in learning to use it, or developing a debugging strategy around it.