Skip to content
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

Debugging options #1157

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Debugging options #1157

wants to merge 6 commits into from

Conversation

dmytrotsko
Copy link
Contributor

Summary:

Added possibility to debug epidata using VS Code Dev Containers extension.
Guide can be found: here

Prerequisites:

  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

…ded start.sh script to run epidata in 'debug' mode
@dmytrotsko dmytrotsko self-assigned this May 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

melange396
melange396 previously approved these changes May 24, 2023
Copy link
Collaborator

@melange396 melange396 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff!

@# see https://github.com/tiangolo/meinheld-gunicorn-docker#module_name
@docker run --rm -p 127.0.0.1:5000:5000 -p 127.0.0.1:5678:5678 \
$(M1) \
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/devops/start.sh,target=/start.sh,readonly \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/devops/start.sh,target=/start.sh,readonly \
`# mount the debuging start script into the container so the webserver uses it ` \
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/devops/start_vscodedebug.sh,target=/start.sh,readonly \

to support renaming the local start.sh file and make a note so its clearer as to whats happening

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, im not sure that bash "trick" i used to add an in-line comment will work inside the makefile...

Comment on lines 104 to 105
.PHONY=web_debug
web_debug:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.PHONY=web_debug
web_debug:
.PHONY=web_vscodedebug
web_vscodedebug:

rename so its clear that this is specifically for vscode

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also include a link to your presentation here

Comment on lines 173 to 174
.PHONY=debug
debug: db web_debug py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.PHONY=debug
debug: db web_debug py
.PHONY=vscodedebug
debug: db web_vscodedebug py

devops/start.sh Outdated
@@ -0,0 +1,18 @@
#! /usr/bin/env sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename this file to start_vscodedebug.sh so its not mistaken for a regular 'start' script

@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants