splunk / splunk/vscode-extension-splunk
Could not create or update the launch configuration .vscode/launch.json
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 96
- Forks
- 28
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 8
Description
I've tried to follow the guide and follow the demo in .conf22 DEV1385C but got the issue while debug in container instance
Traceback (most recent call last):
File "/opt/splunk/etc/apps/SA-VSCode/bin/splunk_debug.py", line 46, in enable_debugging
_debug_config.create_or_update_launch_json(filepath, port)
File "/opt/splunk/etc/apps/SA-VSCode/bin/_debug_config.py", line 35, in create_or_update_launch_json
_create_vscode_launch_config(vscode_launch_file, port)
File "/opt/splunk/etc/apps/SA-VSCode/bin/_debug_config.py", line 123, in _create_vscode_launch_config
_write_vscode_launch_config(vscode_launch_file, main)
File "/opt/splunk/etc/apps/SA-VSCode/bin/_debug_config.py", line 149, in _write_vscode_launch_config
os.chmod(vscode_launch_file, 0o644)
PermissionError: [Errno 1] Operation not permitted: '/opt/splunk/etc/apps/TA-custom-alerting/.vscode/launch.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/splunk/etc/apps/TA-custom-alerting/bin/telegram.py", line 21, in <module>
dbg.enable_debugging(timeout=25)
File "/opt/splunk/etc/apps/SA-VSCode/bin/splunk_debug.py", line 48, in enable_debugging
raise Exception("Could not create or update the launch configuration: {}".format(e))
Exception: Could not create or update the launch configuration: [Errno 1] Operation not permitted: '/opt/splunk/etc/apps/TA-custom-alerting/.vscode/launch.json'
Current folder permission
total 120K
drwx------ 7 splunk splunk 4.0K May 16 10:01 SA-VSCode
drwxr-xr-x 4 splunk splunk 4.0K Jan 20 22:40 SplunkForwarder
drwxr-xr-x 4 splunk splunk 4.0K Jan 20 22:40 SplunkLightForwarder
drwxrwxrwx 1 root root 4.0K May 16 10:12 TA-custom-alerting
[ansible@splunk TA-custom-alerting]$ ls -lah
total 12K
drwxrwxrwx 1 root root 4.0K May 16 10:12 .
drwxr-xr-x 31 splunk splunk 4.0K May 16 10:01 ..
drwxrwxrwx 1 root root 4.0K May 16 10:12 .vscode
-rwxrwxrwx 1 root root 0 May 16 09:59 LICENSE.txt
-rwxrwxrwx 1 root root 3.9K May 16 09:59 README.md
-rwxrwxrwx 1 root root 11 May 16 09:59 VERSION
drwxrwxrwx 1 root root 4.0K May 16 09:59 ansible-tower-demo
-rwxrwxrwx 1 root root 1.5K May 16 09:59 app.manifest
drwxrwxrwx 1 root root 4.0K May 16 09:59 appserver
drwxrwxrwx 1 root root 4.0K May 16 09:59 bin
drwxrwxrwx 1 root root 4.0K May 16 09:59 default
drwxrwxrwx 1 root root 4.0K May 16 10:12 lib
drwxrwxrwx 1 root root 4.0K May 16 09:59 lookups
drwxrwxrwx 1 root root 4.0K May 16 09:59 metadata
drwxrwxrwx 1 root root 4.0K May 16 09:59 static
I've tried to uninstall/install with no success. Kindly advise.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/splunk_debug.py and bin/_debug_config.py, especially create_or_update_launch_json and the _write_vscode_launch_config call shown in the traceback. Reproduce the container debugging flow against /opt/splunk/etc/apps/TA-custom-alerting/.vscode/launch.json and verify that the launch configuration can be created or updated without the reported PermissionError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100