assert "Exception when running skill" not in caplog.texthere https://github.com/opsdroid/opsdroid/blob/a45490d1bdceca39b49880e20262b55ea0be101d/opsdroid/connector/github/tests/test_connector_github.py#L249
caplogstuff working. But I read all about
caplogand there's no reason it shouldn't work. So I tried just straight raising an exception in the skill, and finally just tried putting a breakpoint (like a
pdb.set_trace()) in the skill... and none of it registered. There didn't seem to be any change I could make in the skill that would affect anything at all. I tried this with multiple skills. I only tried this with skills in the github connector so far.
assert resp.status == 201which waits for the skill to be called. Maybe even adding an
asyncio.sleepafter will be enough to get it to hit your breakpoint. But we probably need some testing utility which blocks until the skill has been called.
I have a question about the Github connector. I'm trying to make some modifications to it just to test some stuff out. I make my modifications and run opsdroid with a Github skill set up for the PRClosed event.
I close a PR in my repo which runs the skill. I can tell the skill is initially triggered because I see this message in my opsdroid log:
2021-08-22 23:41:33,955 INFO aiohttp.access: 127.0.0.1 [23/Aug/2021:04:41:33 +0000] "POST /connector/github HTTP/1.1" 201 191 "-" "GitHub-Hookshot/59a1e9d". That implies to me that this line was executed: https://github.com/opsdroid/opsdroid/blob/master/opsdroid/connector/github/__init__.py#L346
However, the code in my skill itself is never run. My guess is that due to the changes I made, there is an error somewhere up the chain in opsdroid itself before my actual skill is run. Something is failing, but there appears to be some sort of rescue in place so that the entire opsdroid itself doesn't die. If that's the case, there is no message being logged, so I can't tell where control goes after the line I pasted above.
Can anyone tell me if they think I'm even on the right path?
Hehe I’m looking into that exact thing :) Going to finish my current train of thought, and then recreate the issue and either get some logging going or suggest what might have helped.
Im picking up the slack connector after a long time and seems like the bot is ignoring all the breakpoints 🤔
Anyone has a vscode debug settings file ?
_LOGGER.info()😉 You don't have to use a debugger.
It doesn’t and I just realised that I’m dumb. I had to install with
pip install . to get it to work. 🤦♂️
I’ve been relying on auto installs while developing for too long