 Okay, I started the recording. So let's continue. Yeah, so basically, as I was saying, right, while we were developing our own developing chain code for for our own platform, right, it was really getting difficult for us to basically debug chain code in real time and truly do an iterative kind of development in for Hyperledge Fabric, right, and that's where that's where we started looking at what are the different options for actually debugging chain code, right. So what I'm going to cover today is basically some of our experiences while doing that. So the different approaches for debugging chain code that already exists. So I'll cover some of that. And then I'll also cover a particular, you know, extension for VS code that we have developed as part of spider it's maybe I made it open source so you know you can use it and as contributed as well but we'll look at you know the Hyperledge Fabric debug VS code extension and see you know how that can easily make that process a bit more easy to debug chain code right with from within within Visual Studio port as such. So basically, you know, first of all, what are the challenges while developing chain code for Hyperledge Fabric, right. First of all, you know the chain code literally runs within within the fabric environment right. So the first thing that you need to have is a fabric environment itself which means you know you need to deploy the peers order us and you know basically set up the entire Hyperledge Fabric network right. Of course you have you know default out of the box test network and scripts available to do that but that's just becomes a prerequisite first of all then the second and more you know painful process really is the updating of the chain code right so when you're developing something you will obviously update and then you have to test it and that is not a very simple process as such right you have to install you have to approve the chain code you have to install the chain code on all the peers that are in the network then you have to approve the chain code and the approval has to be done by each organization which is part of the network and then the chain code has to be committed on the network and then only you know it will run basically right. So every time you update the chain code you'll have to go through this entire chain code life cycle as such to do that. And then the third thing is you know even if you do this right unlike traditional other languages and frameworks right where you can literally run the chain code within an IDE and put a breakpoint and then you know do line by line debugging that is still not possible really out of the box right that's that requires there are some approaches to do that which I'll talk about but you know those are the things which typically is a challenge for for Hyperledge Fabric developers and typically what happens because of that right is that people don't really do debugging within an IDE as such mostly what people start out with and what we also started out with is you know just logging messages or console messages and logging messages and files and things like that and then you deploy the chain code and then you know you basically see what the output is and then you make some changes again deploy the chain code then again you know see what the messages are where the flow is you know what the flow of the code is what which code is being executed what is the output of that all of that you log in messages and then you try to figure your way around right that is very cumbersome of of course right and that's what we also started to do initially but then you know that was really not helping us a lot and it was taking a lot of the developers time over a period of time right so that's where we started looking at different ways of actually debugging chain code right and Hyperledge Fabric does support couple of different ways so there is the Hyperledge Fabric dev mode which I'll talk about and then you know starting with the newer versions of 2.x Hyperledge Fabric versions right there is this new concept of deploying chain code as a service now chain code as a service model although is used for a completely different purpose or it has been built for it completely different purpose but it can actually be used to solve this challenge of of debugging chain code as well which I will which I'll also get into but even these approaches right require you to basically set up your own fabric network and then do some configurations first right to make all of that possible so let's look at these approaches first right and I'll cover the chain code as a service debugging method first because that's the more recent and you know that's where that's the recommended model of deployment also going forward for chain code right so let's let's take a look at how that can actually be used to debug chain code while you're writing it. So essentially a quick background on the chain code as a service model itself first. Fundamentally the chain code as a service model has been designed so that you know you have more control on how the chain code itself is built deployed and run so traditionally right when you when you create a chain code you will you basically have to you know upload it or install it on the peer and then ask the peer to basically run it so the entire entire work of building the chain code from the source code deploying it in a you know in a container where it runs and actually running it was maintained was done by the by the peer node as such right of course you know that means that you can only you know run chain code with which is supported by the with you know the framework versions which is supported by the peer and you know you literally didn't have much control on how it is built how it is deployed and all that right that's where starting with the 2.x versions of Hyperlegia fabric there has been a different model where you have more control on how the chain code is built first of all which is the concept of external builder and then there is also the concept of where you can you know run the chain code by yourself so you can you can run the chain code in your own container essentially and then instruct the peer node to connect your chain code in order to run it right so you are literally responsible for building hosting the chain code and running it and then you instruct the peer to connect to it and submit the request to the chain codes container or server that you are running right essentially so if I look at the code right let me just show you some code of how that actually works so if I so this is the basically the chain code external sample from the fabric samples itself so if I if you if you go to the fabric samples right there is the asset transfer basic sample that has different that is a bit extensive and it has different versions of it in different languages and different ways of running it right so this is the chain code external sample that I'm actually showing you and if you look at the code for that right the way this this works is that the bottom there is the main method and a new chain code is instantiated with a smart contract that has been written and then this chain code instance is passed to a chain code server right and the chain code server is then started so literally yes we are starting a chain code server and running it ourselves right and while starting the chain code server there are few parameters that are given one is the chain code ID which I'll come to what it is and then there is an address so this is the address where our chain code server is literally running and there are some samples if you look at the environment variables sample provided here it's just a you know host and a port right so it could be something like this where the chain code is actually running and on this particular port right so that's what we are literally running the server on a particular address and then that's the first step right and then the second step is typically you know when you deploy the chain code right you will deploy the actual chain code on the peer but in the chain code as a service model you don't deploy the actual chain code you deploy certain files right one is a metadata file which basically tells you certain information like what is the type so there isn't so I was telling that chain code as a service basically is all about running the chain code outside right but before that you have to build the chain code so there is a concept of an external builder and that is an extensive topic in itself but without going into that in too much detail there is a you know inbuilt or default external builder for chain code as a service right so you are basically telling that this the type of the chain code is a chain code as a service and this is just a label or a name for the chain code literally so this the metadata.json doesn't contain much except for telling that this type this chain code is of type chain code as a service right and then the connection information basically tells the instructs the peer that it should connect to this particular address in this particular port to actually submit the request to run the chain code yeah so that's how these two are linked and then it's the connection.json file and the metadata.json file which is actually deployed on the peer instead of the chain code to support this entire model so we look into that but that's the overall high level concept so how do I use this now right to my advantage to actually debug chain code right so the way to do that is let's say you know if you look at the code here right this is a go lang chain code right so what if I simply try to run this within visual studio code right and the way to do that normally in visual studio code is that you go to the run and debug section and basically create a launch file first of all right and when I create a launch file it will basically detect that okay this is a go lang language and it'll give you some options so launch a package right this is what we want to do so it'll give you some configuration like this right let me save that and then I can actually click this to debug but if you do this plainly like this right I need to select the go lang file first where the main method is this is the file with the main method and then I can go and start debugging right but if I do that once it starts it will actually throw an exception or it should it's still trying to start that's because you know when the exception yeah it's through an exception and it's basically saying the CC ID must be specified so it's coming from our code only because you know as we saw in our code there's a chain code ID and address where it starts and we haven't configured those those environment variables yet right so what I'm going to do now is that you know because we know that we visual studio can actually run this code now what I'll do is I'll configure the chain code address to be local host right so simply what we'll do is this should be this address right the connection okay so not this address so basically we will configure and I'll come to that how to do that but we'll ask the the first step is to ask the visual studio code to launch the chain code at local host 9999 right so that the and I will also provide a chain code ID that we will get right so those two we have to provide somehow and we'll run the chain code in local host then what we'll do is we will instruct the peer node to connect to the chain code that is running on local host now the peer node right what we'll do before that is that we have to deploy the peer node so for that I've already you know deployed that in the interest of time I haven't so let me just start that first so that is the typical network network slash as such let me copy that command so I'll just so this is the you know test test network that comes in the fabric samples and I'll just say start the network with start the network with twice let me okay so I'll just say start the network with the channel that is all with by creating a channel my channel right and when I do that it is a fabric network that it will bring with two organizations right or one and or two so it will do that all of that behind the scenes now what we have to do is we have to basically deploy the connection.json and metadata.json right into this network and then instruct the chain peer node to connect to my chain code right so for that what I'll do is instead of this address right what we will do is we'll ask the peer node to connect to the local host 9999 but remember that the peer node is running inside a Docker container so for Docker container for a container running inside Docker to access my local host you have to use a different way of doing it you can either use the IP address of the bridge or there's an internal you know DNS which is host dot local dot internal which you can use which basically instructs the any container that you have to go to the local host on the host where the Docker is running right so this is what we are doing by doing this right so the my chain connection.json looks like this and the metadata.json is pretty simple nothing no changes there right so I've already so and how do I deploy this so you have to basically create a zip file with the connection.json right it's simply zipping it into code.r.gz and then you know you take this as well as the metadata.json and then zip it again right so these things I've already done and if I look at the sample folder. I already have that zip file here right so once you have the zip file what you have to do is you have to simply install that zip file. On to the network that we just created so the above portions here these are just setting some you know environment variables which you would normally do you know even when you want to run any command using the PRCLI on to the. On to the test network that I've just deployed right so I'm using the org one so this is a test network that has two organizations right so I'm using org one and what I do is install that zip file with those two json files the connection json and. And the metadata json. As the chain code so I'm actually not installing the real chain code or anything just those the zip file right and that is successful. And then what you get out of this is the package identifier so this is the chain code that the CC ID that we are talking about right so let me just copy this. And use it here. So once we have that right then what we need to do is to basically and just setting it as a environment variable. And then the next step is to approve the chain code so this is nothing different regular chain code approval as you can see it's. It's nothing different we are using the name as debug CC for the chain code and we are providing the package ID that we got earlier and the rest is you know providing the alter information the TLS information channel information and so on and so forth right so let me just do that approve on behalf of. Or one, which is basically successful, and then let me approve on behalf of or two. And once the chain code is approved, you basically commit the chain code which is again nothing different. Normally how you do that by providing the chain code name the peer addresses the order addresses the TLS configuration, all of that so this is now how you would normally do that nothing and once that is done you'll see that you know the chain code is now committed to the channel right channel that we have. So what we have really done is we have committed the we have deployed the chain code as a service way of doing it and said that okay the peer should now connect to local host on my host to submit the chain code request right now. Let's come back to my visual studio right so as I was saying now we have to run the visual studio chain chain code within visual studio and basically provide these two pieces of information right, so that is where we have to add those as environment variables here right so what I'll do is I'll add the these environment variables in the launch.json debug configuration. So what I've said is that the chain code server addresses local host 9999 where we want to run it and the chain code ID is what we got from the package ID when we when we executed the installed command right so this is a package here it's the same that we have configured here. So that's pretty much it right now we have instructed the visual studio to launch the chain code and connect here right and run it. Now let's see what what happens if we run the chain code again. Okay I have to select the go lang file first and run. So now it will run and it shouldn't give any exception right. So it's still trying but it'll yeah it's it's started running right but nothing has happened till now because it has just started running for the chain code server has started right so now the next step typically right to invoke a chain code. Invoke a chain code is to basically is to basically invoke a chain code method right and the way to do that. Normally people how you did do that is using the fabric CLI again so let me go back here and let's try to invoke a method right so this chain code has an initialize any pleasure method and I'm just invoking it. From the PR CLI. Yeah, so let me try that okay before that what I'll do is now you know supposedly the debugging should work so let me locate the init chain code initialize. So the top in it ledger method and I've already put a break point but you can put a break point anywhere you want right. So let me just invoke it. And now you can see that something is already blinking here and can see that the break point has hit. So now literally the chain code is running in Visual Studio code and when I submit a request to the peer, the peer calls our chain code and with it which is running with Visual Studio and then the break point is it right. So now you can actually inspect you know everything that's if I if you can do line by line debugging, you can inspect the variables right what's happening, what are the values, you can look at the context. You can, you know, do F10 F11 step into step or all of that you can continue right and I just pressed F5 so that it continues and then you can see that the chain code invoke is successful and you get the result. So this is one way of doing it right so the chain code as a chain code as a service external service model, you can actually use to your advantage to start debugging now right once you do all this configuration. Right. Yeah, so that's that's one way of doing it. Yeah, so so this is this this is literally what we did right so irrespective of what language it is it's Golang or Node.js or Java as long as you configure Visual Studio to debug the language corresponding language first, then you can do these additional steps of configuring the connection.json and metadata.json properly, and then start debugging it right. So, so this is, you know, what we went through. There is another way of doing this also which is using the fabric dev mode. So I'll not, you know, give you a demo of this because this is a little bit more complicated to set up the first thing, you know, because there are certain different requirements for this first of all, you know, there is no test of out of the box script per se which will set set this up for you. So you'll have to, you know, download the peer download or build the peer binaries and then you know run the order peer CLI binaries yourself and then do the configuration for this to work. But the way this works is that you know so this will work with. The earlier model that I was showing you write the chain code as an external service that will work with only code which is written for the newer external service model. This will work with anything right literally because this here you will basically you're basically configuring peer to run in what is called as a dev mode and there is some documentation, you know, in the fabric documentation site which tells you how to do that. But basically what in order for this to work right or what this does basically is it runs peer in such a way that when you update the chain code, right, you don't have to redeploy it. So the the, sorry, you don't have to re approve it and commit it again. So the, the steps of committing the chain code and approving the chain code by each organization and committing the chain code need not happen every time you can change the chain code upload it again and it'll run the new chain code without these additional steps to be done. So that is what fundamentally does right at a very, at a very high level, but for it to work right first of all you have to use solo as a consensus. Solo as we all know is sort of deprecated at this time but it still works right. So for this particular reason of debugging you can still use it because it's not really production port or production deployment that you're doing here right. So you'll have to use solo. So, you know, you'll have to create the Genesis block by running conflict the exchange with solo as the profile right and then while, while starting the order node right you have to use the solo profile and the samples for that is given in this particular location right. And then more than what you'll have to do is when you start the peer node right, you'll have to start it in with an additional switch saying pure chain code dev is equal to true. So what happens by doing that, and then you'll have to install the chain code that you're written and then approve and chain code one time right to this, this task here to do one time. So what happens by doing this right is that as I was saying two things right one is, you don't have to do the approve and commit chain code. Again, the second time you update the chain code second time and also that in this model also instead of the chain code being run by the peer, you can actually run the chain code outside. Right, which is what it does and the way you do that is when you run similar to what we saw in the chain code as a service model you can actually run the chain code within Visual Studio code. And while you are starting the chain code right you basically configure some other environment variables like the name TLS has to be disabled because you know solo doesn't work with a well with TLS and for that matter we have to disable TLS. And then what we say what we do is that when we start the chain code we have to pass the peers address to which the chain code should connect. Here is the reverse right in the earlier chain code as a service model we were inspect in instructing the peer to connect to the chain code to submit request but here we are doing the reverse when when we are starting the chain code within Visual Studio code, we are telling the chain code to connect to the peer at this particular location, and then establish a connection to the peer so that when the peer tries to run a chain code instead of the peer running by itself it knows where to send the request to which is chain code which is running within our Visual Studio code environment. Right, so it's a similar model which works slightly different and you know the docs link that I pointed to has some details on how to set it up. The slight complication with this method is that you know first of all you have to do more work to actually set up the network. And then the second thing is you know depending upon the language right the way you configure the chain code in Visual Studio like in go for go you do this. But for Node.js, you have to slightly give the arguments in a different way so the program the way that you launch the in go right you have to launch. You can directly launch the go file while in Node.js you have to launch a module basically and then give your file as the argument to that, and you have to give some additional arguments. So there are slightly different things to be done and but still you know that this is another way of debugging the chain code within Visual Studio code or any ID for that matter where you run the chain code right. So those are you know two methods that exist sort of out of the box within Hyperledge Fabric itself which you can use to your advantage. But of course as we saw right you still need to deploy the network first that's one thing and then you have to understand these additional configurations that you have to do you have to do it in the right way. And then only things will work right. So that's where you know then we thought why not automate all this that we already talked about right and can we do something much simpler. Right then that's where we as PyDRA created the Hyperledge Fabric debugger extension which I will talk about going forward. So basically let me dive into the actual extension itself which will give you a better idea. So let's take the same chain code right which is the chain code external. Yeah. And I'll open a different open it into a different window. So this is the same same chain code. But I've named it differently right in this open in a different window as you can see there's nothing in the lot launch.json or anything right so this is a fresh fresh samples that I've just opened think of it that way right now what you can do is that there is an extension called Hyperledge Fabric debugger right you can basically search it within Visual Studio marketplace and it will come up like this Hyperledge Fabric debugger. And once you install it right it will come up in the left pane. Now if you go here there's nothing there right now but because we have not done anything right. So let's say you want to debug the goal and chain code here right and this is the same chain code as I was saying which is written for a chain code as an external service. Yeah. So in this particular case. I see there are some questions I'll take the questions in the chat, you know towards the end of the presentation but let me just cover the demo first. So if you have any questions, I think first maybe this port, double line, double line port number is hard coded or what. Sorry, which question, what was the question. So the question from Ravi, he mentioned is chain code port number double line, double line is hard coded port or can we customize it. Yeah, you can customize it you can put whatever port you want, it's just a port where you know the chain code will be launched so whatever you configure so let me go back to that. For example, so whatever you configure here right the same you have to put here right so these should match. So this is where you're saying where the chain code should be launched. And this is the section where we are saying, you know, instructing the peer where it should connect. So they should match that's all it's not hard coded, you can you can put whatever you want. I think other he mentioned the what are the types we have. I didn't get what is the question, maybe we can ask. Okay, so if you look at this method out there son. You have a types defined right CCS. So is it what are the types that we have. Yeah, so this is the only built in type literally, but basically this type you can use to so there is this concept of external builder in in fabric right where you can say that you can customize the way the fabric here will build your code. So you can define your own type, and then you can define a builder for that so if you look at here right, there is a sample builder that is given here. So, this builder is what will basically use this type at the end of the day. So if you want to create your own builder right you can define your own type and then use a custom builder for that. So you can look at the how the external builder works in fabric and that will give you a much better understanding of how how that works. Yeah, so here if you see. Yeah, so we have to hardcore this in the sample. What the type that we are going to design whatever yeah whatever you define here you have to use that in the builder, essentially. But this is a built in type essentially that fabric itself understands. Yeah. Okay, so let me switch back to the other chain code right so this is the same external chain code but a fresh one right where we have not done anything but we have just installed the Hyperlegia fabric debug extension. Yeah, so the process is similar if I have to debug I have to first of all create a launch.json file right so I'll create a launch.json file. But you see that there's an add configuration option here right which anyway comes. So if you go to add configuration right and scroll down to the go section, you'll see that there is a option to debug fabric chain code. So this is this doesn't come automatically this is coming here because I've installed the extension. So this extension is contributing this additional option here. So if you select this right what it has done is it has created another configuration section here right so that now you can see there are two configuration section one is the default one which which visual studio code creates which is the just saying I can debug. Go go chain code and now there is another configuration section that is created here. So the first one is called launch package and the second one that has been created is debug chain code. And if you see here right in the debug section, there's a drop down where let me save it. It's not saved. Yeah now if you go to the drop down you'll see those two options here right. So delete the other one which is a default go one because it wouldn't work out of the box anyway, and now you'll see that there's only one option here right. And if you see the configuration options here one is just the name the other is a type so the the extension basically supports go lang and node. So this is going and if you change it to node and I'll show that come to that later it's the it will support node. And then there is another flag which is this is a chain code as a service so we are talking about you know there are two ways of developing chain code right so chain code as a service way or the older way because this is a chain code as a service kind of a code I'll switch this to true. Right to instruct the debugger that the code has been developed to work with chain code as a service model right. And that's pretty much it right you don't have to. So what I'll do is I'll also just to be sure what I'll do is I'll remove the network that we created right so I will. I will do dot slash network such down so I'll bring down the network right the earlier one that we created so we don't have that network anymore and all that you've done is open the chain code and created this configuration fight right and that's it now if I click on debug. Now you see that some things are happening here, it says starting local fabric network, and there is some things happening right so it's actually creating a peer node it's actually creating. So if I look through the through the messages here. So everything that was done to create a network right is being done automatically by the chain code. Okay I got an error because you know as again, I have to select go file before I click the debug which I always forget. Let me do that again. So look at the output here right is as you can see it's creating a CA container CLI container order peer. So everything that happens when you create a network is automatically happening here so the chain code the extension actually does all of that for you. And then it deploys creates the channel if I look through all of that it's creating a channel, and then it's deploying the chain code into that channel and you know, everything that we discussed about how to manually configure the chain code as a service model is being done automatically plug plug in literally that's what is happening. So now the debug is actually started but as we are seeing earlier in order to actually submit a request we use the PR CLI earlier right, but that defeats the purpose right if now again I have to go somewhere else. Basically use the PR CLI and submit a request right so that's where the second thing that the plugin does is. It provides a way to submit the request right from within visual studio code. And the way to do that is by creating a file with a dot fabric extension, you can name it anything like I have named already created a file called this dot fabric here. But the name doesn't matter and you can actually create as many files as you want. Right. So, and how does the file look it's a JSON file basically it's a JSON file which you know which is an array, and there are individual objects that you can create within it. And the structure of this is first of all you say whether you want to invoke or query so just like you know when you're invoking through the PR CLI you say whether you want to invoke or query. You say you basically say that first, and then which method right so in it ledger is a method which doesn't take any arguments so all that you have to say is invoke in it ledger. And you'll see that the moment you type in work right so let me type something new here create a new section type invoke or query you see a send request link appearing above right so like here it's appearing here. You click that. And you can see that you know the result will be on the right so the invocation is successful. Similarly, I created a query query request and get all assets send request. And you know it'll basically send call this method and give you the results. So literally you know you can invoke the chain code right from within visual studio. Of course you can put a break point like here let me put a break point at the top for that let me put it in get read read asset here. And I go to the dot fabric file. And let me create the new section for that because I don't have one. So I say read asset is what I want to do and arguments because this expects some arguments. And what does it expect it expects the context and then ID right so ID is a string so let's say. So asset one is one of the asset that has been inserted via the in it ledger. So I say read asset one and send request. Exist something went wrong in the chain code I guess but it's a it's a it's a it's coming from within the chain for only so let's see what is happening. So I can put I think it's coming from even below above here so let me put a break point here. And if I click on 10 request send request here. You'll see that the break point is set and then you can do F10 and as you can see it cannot read for whatever reason but basically the request is coming in and you can see that. So the when it's actually reading the the asset doesn't exist and some of some reason is coming into this, which is weird. But basically you know this this is this is how you will. You can basically debug right. So what whatever method you put right like for example, in the create asset right, you can, we are calling the create assets so I can put a break point within. Within create asset here. So let me go back here and put a break point here. And if I send request, the break point is hit and then you can see that the ID that was sent, which is a one is what is coming here right so and then you can, you know, be bugged as you normally would do. Yeah, so that's that's the that's the quick and easy way of doing it. As I was saying, you know, this works with go lang as well as Node.js chain code. So let me just quickly switch to a different chain code which is the Node.js chain code and this is again of coming from fabric samples only. And this is the chain code that I'm using here is the asset ledger asset transfer ledger queries because this has some more advanced features around querying. So let's quickly look at that. So this is a chain code that I've just opened in Visual Studio code. And as usual, I go to the debug section, create a launch file, create a Node.js launch file this time. And as earlier, basically, Yeah, once once you create a launch file, you can save it and then as earlier right this time what I'll do is I will take this configuration and replace this with that. And instead of go I'll say node, this is a node based chain code and this is not a chain code as a service. So I'll switch this to false. And yeah, that's pretty much it right and then I go back to the JS file and start debugging. And as you can see it's doing a similar thing it's creating the network launching the chain code and all of that. And once it's ready, it starts printing the message that it's ready. Again, I can create a dot fabric file, but with the methods that exist in this one right so similarly to the need ledger method in the Node.js chain code that gets initiated. You can put a breakpoint. Let's do that in read asset here on it here. So this is a read asset and a breakpoint here. So when I click that it comes here and as usual right I can basically inspect the variables the I can inspect the ID here for example I can step through step over all of that right. There are some additional features that this supports the plugin supports like for example if I go to the dot fabric file right. Normally when you submit the argument right everything even if you do it using the PRCLI everything is a string. So for example in this case right there is a couch DB query that you can submit to query assets. But then you'll have to stringify it first like this and then submit normally right if you look at the sample here that's how they do it right. This is where the couch DB query option way of doing it is mentioned and you know you'll have to stringify and then submit it right like this will work, but this is a bit difficult right and especially if your JSON is huge. So that's where we also the plugin also supports instead of stringifying it and support and and submitting it. You can basically submit it as a JSON itself right so this this will work and this will also work right so when you do that. It's actually changing but let me show you by calling something else first I just called read asset and then if I do this. As you can see the result is coming so you can actually directly writer have a JSON here instead of stringifying it and then then submitting it. If you go to the extension here there are some additional things that you see here first of all, this basically creates a network behind the scenes if I go to my Docker container now right. There is a network that it has created with the CA peer order or CLI and all of that right and couch DB. You can actually manage the network so if you're you know if you're done with your debugging when you quit Visual Studio code it will actually stop the network by itself, but it won't remove the network. So if you want to but manually stop start or remove right if you want to reset the network so the way this will work is that when you when you quit Visual Studio code it will stop the network. Next time when you debug the same network will be reused so any as any anything that you have submitted right any transactions you've made everything will be there in the ledger as such. So you know there will be continuity but let's say you want to start from scratch right so you can remove the network and then then when you debug the next time you'll get a fresh network all together so there are some you know options to manage the network that is created automatically by the plugin. And then the other thing that you can do is you can use, you know, different users. So if you have a case where you want to use different users and do some testing right by default, the plugin will create two users for you or one admin and user user one or one admin has an admin role and user one has a client role within within fabric. But you can actually create more users right like I can say create user and let's say, and that will be created and in the test dot fabric right where you are in working or query you can provide an identity option with the user that you want to use. Right and now when you do this. And if you inspect the code here. Somehow the break point is not hitting. Let me just stop this and start again. So if you submit this with user 10 is gone wrong can chase cannot run the peer. Okay I think maybe when I click something here. I think I'll probably have to reset the network but I basically you know when you when when you use a different identity it should. And if you inspect the context object right you should actually see the different identity that that you basically set up right. So the plugin basically supports multiple users to be created in a wallet and things like that. So yeah that's that's pretty much what I wanted to show you so feel free to you know download the plugin and play around with it. As I was saying you know at spider we also provide our mission is to you know make that option of blockchain easier so we provide a platform that you can also try around so you can go to spider tab and if you go to get started right you should be able to register yourself and try the platform out you can create a type of your fabric network within spider and then you can try out the features we provide a $400 credit that you can use for free and try out the platform so feel free to do that. So thanks everyone I'll take any questions that you have. Can I ask here. Yeah, yeah. Yeah, okay I just have a question but somehow I understand but it's still I want to confirm from your side. So when we do the debugging and executing some transactions before launching it. The transactions will be there I mean how the transaction point of view. The question here is, will there be a transaction that approval mechanism, all those things will be there or just a simple when you launch the chain code just executing the function that's it. I think I think logged in that in that. So are you asking whether the transaction actually goes to the peer is that what you're asking or are you asking about. Yeah it actually does go to the peer yeah so you know if you. So basically the you know what the plugin does is it actually creates a real network behind the scene it's a single or network as you can see so there's no no multiple organizations not. But it actually creates a real network behind the scenes and the transactions are submitted to the peer. It's just that it's all managed behind the scenes for you so you don't have to create your own network, but it's actually going to the hyperlegia fabric. It's executing the code that you have written and everything so it's nothing different. That is internally maintained by the plugins. Correct yeah it's internally managed by the plugin yes. Yeah, I have a question. Can I ask. Yeah yeah please go ahead. I just wanted to check that you mentioned in the fabric we have the chain code as a service and as well as the fabric Dave more. So when you do this debugging so do you support both or is it the chain code as a service is the only one that you are looking for. We support might have. Yeah, we support both actually and in fact you know the samples that I was showing you right the JavaScript one is actually written with the older way of doing it so it's not chain code as a service so there is a in the configuration for the debugger right there is a particular key, whether it's a chain code as a service or not. If you set it to false it's the older method and if you set it to true, which is the other one here, then the plugin works accordingly, and does the job for you. So we support both here. Okay. Thank you. I have another question. Private data collections or the upper mechanism if I mentioned in the chain code, like if, if, for example, if I put a conditions in the chain code saying that only from this organization comes in you allow to execute the chain code in that case how that can be handled in the by the plugin. Yeah, so the plugin plugins the reason. Is to just debug your code right literally. So if you look at the network that it creates it's a single or network and which means you know there's only one peer to endorse right so there is no, there are no multiple peers we are not talking about endorsement policies So private private data collection will work but endorsement but there is no endorsement policy concept as such in the, in the network that the plugin deploys and the reason for that is it's you know it's, it's not really to test any of that right it's not even connecting to any existing network that you have it's deploying it's all right. So the only only intention is just to debug the code that you're right, which is what it is really trying to solve. Yeah, I agreed. But I mean I heard that's thoughts here. What if I launch a network and can I do that debug with that particular work. Not using the plugin but yes, using the manual the way that I talked about right where you know you can basically do the right configurations either as a dev mode or chain code as an external service in your existing network. So then you then it can do yes, but not using the plugin but yes in the roadmap we want to extend the plugin so that the debug works with any existing network that you have. We also want to provide an option to create multiple organizations and in those configure things like endorsement policies and all going forward but right now it just creates a single single. Thank you. Thank you. Thank you. Yeah, please. Is there any doc to test this out for the like the step by step procedure. Yes, yes, so if you go to the plugin itself right the extension plugin itself. You can actually see the documentation right here and there are links to the other to the GitHub report so and things like that so if you see here right. There's a quick start, and you can view this in the marketplace also so there's a quick start how to do that all the instructions are here right here. Thank you. Yeah, just I have one more question as so did this debugger support both the fabric sheen as well as the contract API, both the types of chain code writings. Yeah, it does actually yes correct it does. Okay. If you need a question you can ask otherwise we can. And so you can share the this. We have code extension here I think someone asking the check. Okay, sure, sure, yeah, let me just share that right away. Yeah, and this recording will be available on hyper laser YouTube channel so and that will be also shared on the hyper laser India chapter. So you can follow hyper laser India. Trying to get to the chat window. Yeah, got it. So, can you do can you make me close exactly need to stop the recording. You are the course now. Okay. Yeah. Let's stop recording.