Hi,
i am just wondering if there is a any property that tell if the application is running in remote debug mode?? i know we can use DebugBuild when it is in debug or run mode.
Hi,
i am just wondering if there is a any property that tell if the application is running in remote debug mode?? i know we can use DebugBuild when it is in debug or run mode.
Just curious, what difference would it make?
hi Kem,
i have the following code to check the registry and when i run it as a compile program on windows it is ok, but when i do a remote debug it stop on the ‘rEntry = new RegistryItem(“HKEY_CLASSES_ROOT\.pdf\OpenWithList”, false)’ line with RegistryAccessErrorException.
Function DoCheckPDF() As Boolean
DIM rEntry AS RegistryItem
try
rEntry = new RegistryItem("HKEY_CLASSES_ROOT\\.pdf\\OpenWithList", false)
if rEntry.FolderCount > 0 then
return true // at least one PDF reader
else
return false // no PDF reader
end if
catch RegistryAccessErrorException
return false // no PDF reader
finally
rEntry = nil
End
End Function
No. I did file a feature request a couple of years ago. Have you tried using the #pragma breakonexception off ?
what is the feedback number ? Wayne. And i try the pragma with ‘off’ in the beginning of the function and ‘on’ at the end. doesn’t work
Something to try…
When debugging locally, the app is typically built in a folder that is in the same folder as the project. You could create a routine that runs on startup which does something like this:
Define a Boolean property:
Public RemoteDebug as Boolean = False
Sub Open()
#If DebugBuild
dim f as folderitem = GetFolderItem("").Parent.Child("myproject.xojo_project")
RemoteDebug = f<>nil and f.exists
#End If
End Sub
Thanks for your work around Greg. I find though that with the new licensing system in Xojo the remote debugger is mostly obsolete. It’s just so much easier to install Xojo on the target & use dropbox to sync projects.
Of course this will may be invalidated by iOS build capability - I’m not expecting an iOS IDE - but maybe I’m wrong? The IDE is built with Xojo so shouldn’t there be an iOS IDE? Muad’Dib where are you?
I came up with this method years ago in a situation where an IT dept wouldn’t allow installing the IDE.
Unlikely.
[quote=60100:@Greg O’Lone]Something to try…
When debugging locally, the app is typically built in a folder that is in the same folder as the project. You could create a routine that runs on startup which does something like this:
Define a Boolean property:
Public RemoteDebug as Boolean = False
Sub Open()
#If DebugBuild
dim f as folderitem = GetFolderItem("").Parent.Child("myproject.xojo_project")
RemoteDebug = f<>nil and f.exists
#End If
End Sub
[/quote]
Greg, Thanks for the code… work beautifully. Is there a system variable for the “my project” part??
No, but you could use a constant. That way this method would fail to compile if its not set. Even better, I bet you could set that constant with a pre build step, and I bet there’s a property available there that you could stuff in with the ConstantValue method.
i wonder if i can use the PROJECT_FILE in the DoShellCommand
DoShellCommand
String
cmd as String, timeout as Integer, ByRef resultcode as Integer
Executes the passed shell command. The result codes are the same as for the Shell class.
The shell environment is set up with the following variables:
IDE_PATH to point to the directory containing the IDE; PROJECT_PATH to point to the directory containing the project in the frontmost window; and PROJECT_FILE to point to the actual project file. The command is executed in synchronous (blocking) mode, and returns any output as the result. The default value for timeout is 3000 milliseconds.
Maybe for small binary projects this might work. But for large projects stored in Xojo Project (text) format and using version control, I think the remote debugger provides a better workflow.