- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
Enable debug for all release, attach console for windows.[CPP-380][CPP-384] #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable debug for all release, attach console for windows.[CPP-380][CPP-384] #139
Conversation
| I wonder if this is related? | 
| Hrmm, weird, can we try  | 
| 
 Alright false alarm. I was not running  That being said we currently globally disable debug info in our CI (unless this flag would supersede RUSTFLAGS?). Should I restrict that to only the benchmarks/code quality check so we have this enabled in built releases? @silverjam | 
| 
 Yeah, we can leave it disabled for everything except for the installer/release build, we should still try  | 
| 
 split-debuginfo requires nightly it seems at least for linux AFAICT | 
| 
 Ah, bummer-- we'll need to make a copy of the binary then call  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need automation that does two things:
- Copies the output binary into the artifacts for the release so that we can use this to debug crashes in the future
- Calls stripon the binary to remove the debug info before it's packaged into the app distribution
I think we can wait to see where @notoriaga's PR #146 lands before finalizing this
b46efde    to
    643343c      
    Compare
  
    643343c    to
    96895e6      
    Compare
  
    | 
 Since rust is not building them for gnu, I have read you must rely on other tools for running the debug sessions. I tried Windgb but was not able to figure out how to set up the application to run with our symbols; however, the  | 
| @john-michaelburke can you update the PR summary with your last comment please? | 
        
          
                Makefile.toml
              
                Outdated
          
        
      | script = ''' | ||
| mkdir py39-dist/Scripts | ||
| cp target/release/entrypoint.exe py39-dist/Scripts/swiftnav-console.exe | ||
| cp target/release/entrypoint.pdb py39-dist/Scripts/swiftnav-console.pdb | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just make the entrypoint program output an exe called "swiftnav-console" rather than renaming it
        
          
                Makefile.toml
              
                Outdated
          
        
      | os = os_family | ||
| if eq ${os} windows | ||
| mv ./Scripts/swiftnav-console.exe . | ||
| mv ./Scripts/swiftnav-console.pdb . | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need pdb files for each file that we want to debug, so in addition to entrypoint pdb we'll need the pdb file for the backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pdb for the backend is probably going to be the Rust target/release folder, or it might be in the build directory for Python module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or... it could be a issue with PyO3 setuptools integration, maybe it's not reading the Cargo.toml profile?  Maybe we need to enable this differently in the setup.py for the backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be copied alongside the console_backend python module in the site-packages directory
9116b31    to
    4e71e74      
    Compare
  
    ce2f52c    to
    b230c97      
    Compare
  
    b230c97    to
    f71d8d5      
    Compare
  
    

Implements
https://github.com/swift-nav/console_pp/actions/runs/1409567717
Risks
Since rust is not building them for gnu, I have read you must rely on other tools for running the debug sessions. I tried Windgb but was not able to figure out how to set up the application to run with our symbols; however, the .pdb files are stored so maybe this is sufficient for now.