Subject: Solution for SDBG Read-Only Source Issue in GWT 2.12.2 Maven Project
Hello everyone,
I wanted to follow up on the debugging issue where SDBG opens read-only copies of client code when hitting breakpoints in our GWT 2.12.2 Maven project with Eclipse.
After some research, I've found several potential solutions that should resolve this problem:
## Quick Fix - Launch Configuration Source Path
The most common solution is adjusting the Eclipse debug configuration:
1. Go to **Debug Configurations** (right-click your launch config)
2. Navigate to the **Source** tab
3. Click **Add** → **Java Project** → Select the **client module**
4. **Important**: Ensure the client project is at the **top** of the source lookup path
5. Remove any duplicate workspace entries that might be interfering
## Additional Solutions to Try
### Verify GWT Module Configuration
Ensure your GWT module XML includes:
```xml
<source path="client"/>
```
### Maven Plugin Configuration
Check that your `pom.xml` has the source directory properly configured:
```xml
<sourceDirectory>src/main/java</sourceDirectory>
```
### Eclipse Project Structure
- Verify `src/main/java` is listed as a source folder in **Java Build Path** → **Source**
- Confirm output folder points to `target/classes`
### Clean Rebuild Approach
If the above doesn't work, try this reset:
1. Clean all projects (**Project** → **Clean...**)
2. Delete `.classpath`, `.project`, and `.settings` from all modules
3. Reimport as Maven projects
4. Restart Eclipse
### Add Compiler Argument
As a last resort, add this to your GWT compiler arguments:
```
-src src/main/java
```
## Root Cause
The issue occurs when Eclipse's source lookup finds compiled class files or JARs before locating the actual source files. The key is prioritizing the client module's source directory in the lookup path.
Please let me know if any of these solutions work for your setup, or if you discover alternative fixes. Happy to discuss further!
Best regards