Using wild type characters on paths for Charles breakpoints - charles-proxy

Im trying to accomplish a capture all breakpoint for a path that changes each time it's called. For instance once its called accounts/validate_device/trans/_accounts_validate_device_d7be5ea4-2b3c-4c20-8190-2c7653af83jj nd then next time everything after accounts/validate_device/trans/ changes. Whats the wild type character, or is there any?

Ah so simple it was * not sure why it didn't work the first time

Related

Why is "Cast to BP_Ladder" failing all the time?

I am having trouble with my Unreal Engine 4 project. I'm very new to this and i don't really understand what's going on. I have made ladder functionality so the character can climb up the ladder and stand on the Static Mesh that is on top. But when i want to go down the ladder i want to trigger the "Allow Down" function on Actor "BP_Ladder" but the cast is failing everytime. what is causing the casts to fail?
I've looked around and other people with cast failed problems have mostly had the names wrong but my ladder is called "BP_Ladder" and that is what i'm casting to so that leaves me really confused.
My BP_Dude blueprint (this is being called every tick)
My BP_Ladder blueprint (this is what i'm trying to trigger)
The goal for this function is that the collision of the static mesh will turn off and then allow me to move down the ladder like normal.
I'd really appreciate your help with this, its my first couple of days using unreal engine and the Epic Games tutorials i followed didn't show all of the blueprints so everyone was left helpless with half broken blueprints.
Understanding Casts
In its simplest form, if your Actor can be cast to BP_Ladder, then it will return the casted object on the output pin.
Just to ensure you know how a cast works, I have to point out that you can't cast a given type to some unrelated arbitrary type; it has to be "castable" to the cast destination. So if you think that the Actor object returned by your overlap is genuinely a BP_Ladder, or a blueprint class that derives from BP_Ladder, then you should be OK. But that has to be the case; otherwise it will fail every time.
https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/CastNodes
Sorry if I'm being patronising, but if a cast isn't working 9/10 it hasn't been used correctly.
Debugging
OK that out of the way, if you think you are genuinely casting to the correct type and it's still failing, then you'll need to debug your blueprint with the objective of finding what type is being given to the cast node which results in the failure.
Select the cast object in your blueprint.
Press F9 to create a breakpoint; a red circle should appear on the top left of your cast box
Run your game in PIE mode (Combo next to play, New Editor Window (PIE))
Put the game in a scenario where your cast will fire (I presume touch the ladder)
The breakpoint should trigger; your game window will go grey and you'll get a large red arrow pointing down towards your cast box where you placed the breakpoint
Hover over the Object pin on the input side of the cast box. It should show a alt-text containing details of the variable.
Inside the alt-text box, look for Current value; this should show you the current object type that you are about to cast. You need to ensure that this value is what you expect.
https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Debugging
Example
I've taken a screenshot of a working game; in this you will see:
a Breakpoint (the red circle) is shown on the function node (the box)
the Execution node (red arrow) is Create Rolling Stock
the Current value of the variable is DepotComponent...Depot
Final thoughts
There's a couple of gotchas when using blueprints; one of them in this case could be that you can have two classes with the same name (although they might have different internal "script names" - effectively a fully qualified path). When you debugging an object variable, make sure you match the entire path to the location of your asset in your content folder; this will ensure that you are indeed attempting to cast to the object you think you really are.
Another classic gotcha is "hot reloads". Sometimes the editor needs to reload a module after an on-the-fly build but a class conflict occurs internally; this results in the new version of the class getting a different name (prefixed with HOTRELOADED). Watch out for this; it can cause you to be dealing with two distinct types when casting and you don't even realise. A real sanity-sapper. If in doubt, close and re-open the editor; it fixes it every time.
On Begin Overlap is only triggered when you START an overlap, so if you have some logic that sets your "can climb" to false you will need to move outside of the collider and back into it again for another Begin Overlap event.

ROBLOX Studio ScreenGui score display

How do I make a TextLabel's text update to a variable?
I have tried setting the text to "score: ", _G.score
but it won't update with the variable, and yes I do set the text after the variable has updated.
Code:
script.Parent.mouseClick:connect(function()
_G.score = _G.score + 1
game.StarterGui.ScreenGui.TextLabel.Text = _G.score
end)
game.StarterGui is actually a template GUI, and every time a player joins the game, a copy of it is made and given to the new player. Thus, if you try to modify it, you will not be actually modifying the copies of it that were given to all the players.
There are two solutions to this problem:
Only use relative paths—that being, only use paths to GUI objects that begin with "script." just like you said script.Parent.mouseClick:connect(…).
Iterate through all the copies that have been given out to the players. This can be found under each Player object's .PlayerGui.
You should almost never do the latter. Here's how you can decide:
If you have code that is found within the StarterGui (rather than in the Workspace or something), then you should use the former. This is because when the StarterGui gets copied into a new player's GUI (called a PlayerGui), that script will get copied along with it since it was inside of the StarterGui. Thus, a relative path like script.Parent.Something.SomethingElse.Text = "hi" will be valid; it will affect that PlayerGui.
If you have some code that is not within the StarterGui (like if it's in the Workspace), then you must use the latter. This is because such a script will not get copied into each player's PlayerGui. As a result, you must go through each player's PlayerGui in a for loop or something similar. This scenario is very rarely the case, and if it ever is, consider trying to make it not the case if possible because this is a very hairy situation to try to deal with; you have to account for special circumstances like the possibility that a player hasn't gotten a copy of the StarterGui yet.
Please let me know if this explanation was in any way confusing; I'll try my best to explain it better.
You can find some visuals to go along with this explanation and some further reading on the official ROBLOX Wiki's explanation of this topic here: "Player vs. Starter GUIs".

Debug breakpoint in Swift Playground?

I'm trying to add a breakpoint in the line # gutter, but no breakpoint is added when I do this in the playground. Is this possible or is there another way to set breakpoints in the playground?
There's no debugger so you can't add any breakpoints.
Matt, I could not enter code in the comments so here is a better view of using a variable on a line by itself to "debug" it.
for index in 1...5 {
dosomething(foo);
foo;
}
Then you can click the eyeball on the right hand side to see a history of foo as it was modified in the loop.
If you want to pause execution of a playground to have a peek at what's going on, you can use sleep. The information you can get isn't nearly as granular as what you can get from lldb.
To do this, you'll need to add import Foundation at the top of your playground.
Then, wherever you want to pause execution, you can add this:
sleep(10) // 10 second pause...you can make the number whatever you want
I'm just getting my feet wet in Swift, but I think the playground idea is to show the changing state as if you ran in debug and recorded all the variable changes. There's no actual need for a breakpoint as you can see the state at any "point in time". I think it'll take me a while to get used to it, having used a debugger for > 30 years, but should be quite useful for small bits of isolated test code, especially while I'm learning the language.

Stop execution (breakpoint) every time the execution enter in one of my classes

Is there any way to stop the execution EVERY time the app enter in one of my classes?
The equivalent would be to put a breakpoint in every single entry point of my class (for ex. viewDidLoad, viewDidAppear...) Sometimes I just need to capture every time my class is called, and I dont know which one is the entry point, so I was obliged to put a breakpoint in every entry point.
Is there any way to automatize this?
Don't know about a class but maybe this can help you.
Setting the breakpoint on a file.

Always Change value of a variable at a certain line of code

I know that a variable value can be changed in the debug mode of Eclipse. But can I make that change happen every time a certain line is getting executed?
What I want to do is to make the change every time without manually having to do it.
If I got you right, I might have a solution that suits your needs here (or at least "might have suited", for I must admit this thread is pretty old by now ... ;-):
I had a similar issue this morning, detouring a "mailTo" (just a variable holding the recipients adress). I came to use a conditional breakpoint with the following condition:
"42" != (mailTo = "a#bc.de")
You always hit the breakpoint because "42" (or whatever value ;-) will never be equal to the assignment on the right - which yet does the main-job here.
Its also possible to make it "really conditional" (if needed) by using {real condition} && {fake condition} (because the fake is then depending on a preceding 'true')