I am using VS code, Visual code extension for debugging (showing the state of the code, putting marks where to run before running line by line and always showing the state of the parameters etc..) and I am trying to think how I should begin to check what is wrong if my codes with python standard library called webbrowser works only when I am using my debugger extension. My different short python scripts function if I run them while using the debugger extension but not while running them without the debugging extension. I have an example code which worked fine earlier but don't work anymore.
The next code is an example which works if I have copied and address like "Tammiston kauppatie 10, 01510 Vantaa" (which is a Finnish street address to a climbing venue) and it is on my clipboard. This short script should take the address copied from the clipboard and open google maps site showing the address.
import webbrowser, sys, pyperclip
if len(sys.argv) >1:
adress = " ".join(sys.argv[1:])
else:
adress = pyperclip.paste()
webbrowser.open("https://www.google.com/maps/place/" + adress)
At the moment the code above doesn't open my current webbrowser and doesn't give any error messages either.
Any ideas how to make my code to work again? How to start checking what's wrong?
Other maybe useful info:
[tool.poetry.dependencies]
python = "3.9.13"
requests = "^2.28.1"
pyperclip = "^1.8.2"
VS Code:
Version: 1.70.1 (user setup)
OS: Windows
The debugger extension says that it supports the codes with Python language: >=3.7
Also -> using Chrome, up to date version.