You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an exception occurs on the client-side, the stacktrace is often all over the place and therefore mostly useless.
For example:
[16:35:26][Error][C#] Exception in timer at lacnr-cs-client G:\ALTV DEV\server-resources\cnr-cs-server\CopsAndRobbers.Client\Features\Peds\Base\WeaponizedPed.cs:32: AltV.Net.Elements.Entities.EntityRemovedException: Entity(Type=Ped, id=246) got removed.at AltV.Net.Client.Elements.Entities.Entity.CheckIfEntityExists()
at AltV.Net.Client.Elements.Entities.Entity.GetStreamSyncedMetaData[T](Stringkey,T&result)at CopsAndRobbers.Client.Features.Peds.Base.DynamicPed.get_TargetEntityType()atCopsAndRobbers.Client.Features.Peds.Base.DynamicPed.GetTargetScriptId()inG:\ALTV DEV\server-resources\cnr-cs-server\CopsAndRobbers.Client\Modules\Minigames\CircuitBreaker\CbGenericPorts.cs:line 193
at CopsAndRobbers.Client.Features.Peds.Base.WeaponizedPed.AttackTarget()
at CopsAndRobbers.Client.Features.Peds.Base.WeaponizedPed.On500Ms()
at AltV.Net.Client.Elements.Entities.ModuleTimer.Update(Int64 curTime,StringresourceName)
Now, regardless of the exception itself (I was messing around with stuff), note how it tells me it's coming from CbGenericPorts.cs:line 193. But that file has nothing to do with this entire class. It's not even being used anywhere (I never instantiate it as I don't use that file yet). So how come this thing pops up out of nowhere?
Additionally, I was working on a custom logger and wanted to use [CallerLineNumber] attribute. Which works, but again is showing up on the wrong lines (randomly).
The second log (nodes: []) actually does show up on the correct line number though. So line 114 is actually where the line in the code is located as well. So it does work, but not all the time?
Imho this is a pretty breaking issue and high priority because:
We can't use debuggers client-side (so no breakpoints etc)
Without debuggers, one has to rely on exceptions, stacktraces and log lines
But stacktraces and log lines are also inconsistent and unreliable, so how can we properly find and debug client-side issues?
The text was updated successfully, but these errors were encountered:
When an exception occurs on the client-side, the stacktrace is often all over the place and therefore mostly useless.
For example:
Now, regardless of the exception itself (I was messing around with stuff), note how it tells me it's coming from
CbGenericPorts.cs:line 193
. But that file has nothing to do with this entire class. It's not even being used anywhere (I never instantiate it as I don't use that file yet). So how come this thing pops up out of nowhere?Additionally, I was working on a custom logger and wanted to use
[CallerLineNumber]
attribute. Which works, but again is showing up on the wrong lines (randomly).For example:
Now, the first one is completely wrong. It mentions that the log originates from line 29. However, line 29 is this:
The real location of the log is actually on line 61:
The second log (nodes: []) actually does show up on the correct line number though. So line 114 is actually where the line in the code is located as well. So it does work, but not all the time?
Imho this is a pretty breaking issue and high priority because:
The text was updated successfully, but these errors were encountered: