Debugging Protractor with WebStorm - protractor

So new to Protractor, so please bear with me.
So I have some simple tests written, and I can run (and sorta debug them in WebStorm). I say sorta debug, because when I run my test, it hits all breakpoints and console.logs before actually executing any of the code. it almost like it goes through the code twice.
As an example, the first thing my test does is go to a page (after loading the landing page).
browser.get('/#/divisions');
If I set a break point after it, it will hit that break point before going to the divisions page. I thought it maybe an async/await issue, but after trying to make everything async, it did the same.
Any idea on what I might be missing?

Related

Can I stop XCode from breaking on a fatalError/preconditionFailure?

I've got some conditions where I need my frameworks to report a fatalError or a preconditionFailure and crash. I have set up some unit tests around these conditions to make sure they hit correctly.
It works really well if the unit tests are run without a Test Host application, but the moment a Test Host application is involved, any fatalError or preconditionFailure hits an automatic XCode break with the message Thread 1: Fatal error: <CUSTOM ERROR HERE>. and stops the execution of the rest of the tests until I press the Continue program execution button manually.
This is obviously an issue because I can't just let my tests run in the background and I need to be actively hitting the Continue button every time one of these tests hits which is quite annoying.
Is there any way to disable this XCode break?
Looks like this is fixed in Nimble 7.1.3, a library which I use to test these particular cases. I also found this specific issue in the Nimble library issue 478 which has a comment on a workaround you can use to disable the debug executable when running you tests. Hopefully this helps anyone else stuck with the same problem I had.

Roblox PointsService:AwardPoints() local testing

Locally, in single play mode, any PointsService:AwardPoints() just fails silently. Even wrapping it inside pcall() does not give me anything, success nor error. Lines after that one are just not executed and function returns.
I'm guessing it will not work locally? But behavior is weird and I don't know how to develop/test it. I've been banging my head with this for hours, maybe too long and I'm missing something obvious?
EDIT: after more testing, to avoid adding more comments, I realized expected error is returned (Processing PointsService:AwardPoints error: HTTP 0 (HTTP 403 (HTTP/1.1 403 Forbidden))) but only after I restart Studio and during first local run (Play). As soon as I hit Stop and then Play again, errors are no more returned and behavior is back to described.
Also, it appears to work in Test mode. I'm guessing that "Cleanup" button helps, while "Stop" in single play mode doesn't.
Still, quick testing with Single Play mode is not possible and it slows down development a lot
This could be happening for two reasons:
You're trying to award PlayerPoints while in Play Solo, which is restricted.
- OR -
You're trying to award points from a LocalScript, which is also restricted. Points can only be awarded from the ServerSide to prevent exploiters from ruining the leaderboards.

ScalaTest unit test dont hit breakpoints

So I have a small problem on which google mainly hits wrong results.
It is very simple: I make unit-tests for scala using ScalaTest FunSuite and my breakpoints inside the tests dont hit (Intellij 2016.2.5, previous version was the same,already updates). However when I place breakpoints in code outside of my unit tests the debugger does break. Settings on the breakpoints are exactly similar (ctrl-shift-f8).
So for some mysterious reason breakpoints inside my test will never hit but outside it does (proofs the forking trick is not doing any good). The project is very new still. Running this on another machine does work somehow so I suspect it is some setting in Intellij.
I am a bit lost on this and dont feel like writing mains to hit breakpoints.
Thanks

working with workspaces and Pydev in Eclipse

im not sure what i did.. but i am working through some tutorials to get up to speed on python, and i started getting this error message... any ideas on how to fix this? from the error, i looked up the message, and it looks like wham i press the run button it is looking for a file that is no longer there.... but I'm not even working on that file anymore... I'm trying to run something different that does not refer to the previous file.
what does work is if i do run as.. but id rather not do that every time. I'm sure there is a setting I'm just not aware of that i messed up.
Well, not sure how exactly you're getting to that point from your explanation, but please take a look at: http://pydev.org/manual_101_run.html to see how to properly run a module inside PyDev.

debugging a node application with eclipse

I followed this tutorial and got Eclipse to recognize the program I'm debugging.
However, after setting a break point, and steering the application to the break point, the application just seems to ignore it.
The code continues merrily as if nothing happened, and I don't get to see the variables I'm trying to look at.
Unfortunately I don't know what info to include here, so if you need more information, just let me know in the comments.
You have to be careful with what you are doing. There are some pitfalls when debugging node applications in eclipse. Here are some tips that might help you.
Start your application with node --debug-brk your-script.js
Start the debugger in eclipse
Step over (F6) the first few require statements, that import the code you want to debug.
Set your breakpoints. (Be sure you don't set breakpoints in the source files you are currently editing. When debugging, there is a "Project" in your workspace that contains all the scripts that are loaded by node. Set your breakpoints in some of these files. Otherwise the breakpoints will be ignored. Most often you want to set breakpoints at the beginning of a callback.)
Then resume (F8) the script and it will pause at the first breakpoint it passes.
Start with that until debugging works for the first time. After that you can try more unconventional cases.