MDK-SE icon indicating copy to clipboard operation
MDK-SE copied to clipboard

Is there a way to emulate your blocks within VS?

Open PhilWilliams-dev opened this issue 3 years ago • 2 comments

I am sure this is a no but just wanting to make sure, is there a way to create an object to set and read values from (for example a light) while debugging in Visual Studio ?

Thanks

PhilWilliams-dev avatar Feb 15 '22 21:02 PhilWilliams-dev

Yes, you can. But you'll have to mock up everything, from the GTS to the grids and the blocks in question.

If you look in the MDK folder, you'll see there is a bootstrapper there, which is meant to be a starting point for just such a process.

Look up Moq, for instance, for a mockup library.

https://github.com/moq/moq4

I've used these techniques in the past to do unit testing on my scripts.

malware-dev avatar Feb 16 '22 10:02 malware-dev

A project for this was started a long time ago but had to stop development due to lack of time. https://github.com/malware-dev/MDK-Mockups

It might be a good starting place for implementing the missing blocks. Otherwise a stubbing library like Moq might be a quicjer solution.

kwilliams1987 avatar Feb 16 '22 10:02 kwilliams1987