microsoft / microsoft/ConcordExtensibilitySamples
How to change the value of an argument at a breakpoint?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 135
- Forks
- 54
- Avg merge
- 5h 58m
- Merged PRs (30d)
- 3
Description
We've implemented an EE for our language basing it on the Iris example. When running and hitting a breakppoint, we can change values of globals and locals but not of method arguments. This is the IL code we generate for updating the second arg with some value:
.method public hidebysig instance void '$.M1'(string 'elUno', valuetype [mscorlib]System.Decimal 'elDos') cil managed
{
.locals init ([0] valuetype [mscorlib]System.Decimal '#cash', [1] string 'des@', [2] string 'des@ita', [3] valuetype [mscorlib]System.DateTime 'horaL', [4] valuetype [mscorlib]System.DateTime 'diaL', [5] valuetype [mscorlib]System.Decimal 'diaDec', [6] string 'diaStr', [7] valuetype [mscorlib]System.DateTime 'stamp')
ldc.i4 76543
ldc.i4.0
ldc.i4.0
ldc.i4 131072
newobj instance void [mscorlib]System.Decimal::.ctor(int32, int32, int32, int32)
starg.s 2
ret
}
but the value does not get changed in the program. Are we generating the right IL for it? What are we missing?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the shown starg.s 2 sequence with the Iris example and inspect how the EE applies edits to method arguments at a breakpoint. Verify the argument slot and generated Decimal value; done when changing the second argument is reflected in the running program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100