Debugging Mojo for Palm Pre with Eclipse & Aptana - aptana

I'm pretty new to Eclipse and Mojo (.NET guy). I'm having difficulty debugging. I can set breakpoints and switch to the "Debug" Perspective, but no matter what I can do (I am running in debug mode), I can't seem to get the IDE to stop at a breakpoint in the emulator. I'm sure it's a pretty newbie mistake with Eclipse. Anyone have a good step by step I can follow.

Currently, there is no way to set a breakpoint in eclipse for use with the palm emulator.
As Gtompson83 mentioned, all we've got to work with is the gdb-style command line debugger that is included with the SDK.
Yes it's a pain.
I find it easier to attach to the emulator via ssh (scroll down to "Debugging" section) to view logging, and then just using logging in your app to figure out what is going on.

Palm has a debugger as part of the command line tools. You can set break points and check variables.
Debugger Info

I like using the Ares Debugger/Logger. It works even for code not developed using Ares.
After starting the debug mode in Eclipse (changed debug config for the app to have checked the checkboxes for Inspectable and Mojo debugging),
launch the following URL in your browser (I've had the best results with Google Chrome):
http://ares.palm.com/AresDebug/ (you can use also AresLog for logger)
For AresDebug you may need to adjust the Script Filter to start with whatever your appinfo.json file has for the "id" value, then press Get Scripts. Then you're basically good to go. You can select another *.js file and set breakpoints, etc.

Related

Visual Studio Apache Cordova - IOS build rotation issue

I'm a starter in writing app code in Visual Studio 2013 Community Apache Cordova and have managed to connect VS2013 with my Mac. Once I have gone through the process of building the app in VS and on my Mac and installing in on my iPhone, I open it up and it won't rotate. It doesn't rotate for a number of basic apps that I've written nor does it rotate if I build the default new project "Hello, your application is ready!" app.
I have done some research and tried changing the config.xml "Orientation" preference to "both", through the code window and also in the designer window but that doesn't change anything. I've also noticed that adding in a "BackgroundColor" preference doesn't work either.
Does anyone know if I may have configured something incorrectly or perhaps need to add something to my code?
All the HTML, JS and CSS that I've written seems to work okay (with the exception of trying to link URLs to the Safari Browser but that's another issue).
I have noticed the same issues. I tried finding some settings to fix that in the config.xml, but was not successful. I have resolved myself to just opening the iOS project in XCode and changing a few things:
Device Orientation: no matter the config.xml setting, its always only Portrait. I click-check the other 3 orientations.
Team: I have multiple developer profiles, and I need to choose correct one here.
Bundle Identifier. I screwed up one project, and have different case for iOS and Android. I leave the VS one as the Android one, so I can build completely correct for Android. Since I know I have to go to XCode for iOS anyway, I change the bundle identifier here.
You can find the project using Finder at ~/remote-builds/builds/9999/cordovaApp/platforms/ios/*.xcodeproj, where 9999 is the build number, though not necessarily the latest, largest number, but the latest datetime of the folder.
You can also refer to Greg's answer in this related post as an alternative solution.

How to run Dart code from Visual Studio?

I'm building an asp.net website using Visual Studio 2012. I'm considering adding some dart code into it.
I'm trying to check how this thing works: I downloaded the DartVS visual studio extension, and I took a ready dart code from the web. The dart code runs fine on dartium when I run it from the dart IDE.
I copied and pasted the code to Visual Studio (that now recognizes dart thanks to the extension). When I run it from there - I could see that the GUI appears, but the buttons don't seem to work. I put a breakpoint in the dart code's main function but it doesn't seem to get there.
What am I doing wrong?
Thanks!
Edit: Although not full Visual Studio, I have created a VS Code extension that does support debugging here.
I'm the author of the extension you linked. Currently, there is no debug support. If you're going to launch from VS in the browser, you'll need to add Dartium to the list of browsers in Visual Studio.
The current version of the extension is very limited and just uses regular expressions to syntax highlight and runs the command-line Analyzer for error info. Both of these kinda work; but have some flaws.
I'm working on a new version; which is backed by a service written by Google, which has very reliable syntax highlighting, tooltips, GotoDefinition, code-completion and more. It's not ready for testing quite yet; but it'll be pushed as an update to the extension you already have once it's done.
The plan is to ultimately include Visual-Studio debugging; but for now, I'd recommend using Dartium and debugging in the developer tools.
When you run the code from VS - where does it get executed? Dart is only supported in Dartium so far - so if you want it to work in any browser, you have to use dart2js for now.
I don't know what that Extension does but this might be the problem.
Regards, Robert
You can start pub serve and Dartium manually and point Dartium to the URL pub serve listens to.
DartEditor also launches pub serve for this.
I don't know if your extension has any debugging support but in Dartium you can debug Dart and JavaScript code like JavaScript code in the normal Chrome browser dev-tools.

vs2005 - Switching between design and source mode get stuck

I dont know if anyone else has had this problem. I'm using VS2005 working on a C# website.
The problem is on the .aspx page, when I click on the "Design" option two things happen.
It does not switch to design mode. I see only source. But I the problem is that the source mode gets stuck and uneditable.
Second thing is that I cannot switch back to source mode and hence am stuck only in that non-editable mode.
I tried to Reset my settings, but that hasnt helped.
Any ideas?
Try running visual studio in safemode. Launches Visual Studio in safe mode, loading only the default environment and services, and shipped versions of third party packages.
Try the below command in Start-> Run
devenv.exe /safemode
http://msdn.microsoft.com/en-us/library/xee0c8y7(v=vs.80).aspx

How to debug in AS3 only project in Flex...?

I am trying to build a AS3 only project in Flex....I have tried debug mode, but seems like it takes so long to compile....I can't use trace or check variables...Are there anyway to do debug?? Thanks for the help..
Which version of Flash Player have you installed, you need the debugger version. Check your browser , some browsers like Chrome for instance , come with Flash Player bundled in , but this isn't the version you need. You can also check your application properties, particularly the Run/Debug Settings.
Last but not least, you could also watch this Lee Brimelow tutorial, about using MonsterDebugger
http://gotoandlearn.com/play.php?id=109

Edit source code when debugging

I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."
I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions?
This may seem counter-intuitive, but turn edit and continue off.
There might be another "allow me to edit read-only files" or "allow me to edit even when I am debugging...no really!" setting somewhere, but I don't have 2005 to look at to check.
In 2008, turn off edit and continue and you can edit while it's running (but those changes aren't appplied.)
If you actually want to use edit and continue, you also have to enable it for the project, on the web tab of the project settings.
The application is actually running off of a compiled version of your code. If you modify it it will have to recompile it in order for your changes to work, which means that it will need to swap out the running version for the new compiled version. This is a pretty hard problem - which is why I think Microsoft has made it impossible to do. It's more to protect you from THINKING some changes were made when they really weren't.
For Asp.net it is possible to think of two types of 'edit and continue'.
One is a classic edit and refresh the browser. This works because the browser refresh recompiles everything except precompiled code behind files. This is not referred to as Edit and Continue, though in practice it provides a similar effect. In this mode you cannot change code behind files, because they were precompiled and deployed, but you can change just about anything else.
Another mode allows you to change precompiled code behind files but nothing else ... (this is the mode Chris Bilson mentions which needs to be set on the project properties for ASP.Net). In this case you are using the Edit and Continue feature of the debugger, which knows preciously little about ASP.net. The debugger just sees a loaded .Net assembly and can modify it when stopped in the debugger because there is a project in the solution that claims to know how to build it. In this case you are prevented from modifying things that would otherwise mess up the debugging session. This method however is the only way to change the code while it is running rather than requiring a browser refresh.
You are allowed to make changes to the *.aspx file while it runs, and you can hit refresh on your web instance to see those changes immediately. However, you cannot make changes to the *.cs/*.vb or *.designer.cs/*.designer.vb files while the program runs.
I search for this on Visual Studio 2008 WAP (Web Application Project) and it took me two days to find the solution, so here it is in the hopes it helps somebody else:
There are two locations that have to be checked, one it under tools-options-debugging-Edit And Continue-Enable Edit And Continue, the other is right click project-properties-Web-Enable Edit And Continue
For the record, I had a similar problem with VS 2008 and a different solution resolved the problem for me. Editing code in Visual Studio 2008 in debug mode
Check that you are not in release mode.
In release mode you cannot edit your code while debugging. Just change mode to Debug

Resources