Question
I'm attempting to debug a sample HybridWebApp with HybridService using Tizen Studio 1.2, but I'm unable to stop at breakpoints in the service application.
Here's what I've tried:
- Right-clicked the project and selected "Debug As > Tizen Web application"
- Received the message: "Service application will be debugged when the breakpoint is hit"
- Then encountered the error: "Cannot launch application with GDBServer. The application (hHgQy4LB6M) is not running on emulator-26101"
The application runs and works fine except it doesn't stop at the breakpoints I set in the service application. The Tizen Studio log file shows: "[2017.09.27 15:38:39][ERROR] TizenAttachDelegate.java(154) - Could not check the application is running or not."
How can I properly attach the service application to GDBServer for debugging?
Answer
Problem Understanding
The issue occurs when trying to debug a Tizen service application where:
- Breakpoints in the service application are not being hit
- GDBServer fails to attach to the running application
- The debugger cannot verify if the application is running
Solution Methods
-
Workaround using Logs:
- Since direct debugging might be problematic, consider using extensive logging in your service application
- Use
dlog_print()for native applications orconsole.log()for web applications to track execution flow
-
Alternative Debugging Approach:
- Try using the "Attach Debugger" option instead of "Debug As"
- Make sure your service application is running before attaching the debugger
- Verify that the application ID matches between your project and running instance
-
Environment Verification:
- Ensure your Tizen Studio and SDK are up-to-date
- Check that the emulator or target device is properly connected
- Verify the service application is properly signed with debug privileges
Additional Tips
- Service applications might require different debugging approaches than regular applications
- Consider testing with a simpler service application to isolate the issue
- Check Samsung Tizen OS documentation for updated debugging procedures