Hello, last video we create a simple ADF application with one page has a button to validate email address and we receive an error once we press on the Validate button. So in this video I will show you how you can trace or debugs it's good to know where exactly the error so, I will stop my application and I will stop my embedded WebLogic Server as well. So you should stop everything. After that, I will open my mean and what is the first line which wants the user press on the button what function will be called this function will be called Chen is the first point which the user wants press both keyboard on will be executed. So I will go here and I will click one click here. Rate point will become as it It means this one says you will run your application in debug mode.
And once the compiler reach to this line, it will stop. And after that you can start move line by line and check the value. So now, we stop everything. And we add a breakpoint for the line which I need to trace the code starting from this line I need to trace. After that I will right right click and instead of from I would call debug. Run you can run multiple EDF application in your one immediate WebLogic.
But debug it will only run a debug for one ADF application. So if you run this ADF application in debug mode, if you open in another application and run in the book, what usually stops this application and one runs the other one. So the debug mode was run only In one ADF application Okay, so, now our application is running in the debug mode How would you know if it is run go to muck mode or not if you go to the G developer and you find this is two icons which we open it you will find these icons red icon it means this is in the integrated publishing server is running in debug mode Okay. So now it has an image like this domain.com and press validate. So, you will find here once the combine or reach to a specific role, it will stop there which we mark it as a breakpoint.
So stop here in this line zero, a built in function called Get a loop built in a drill down function called emit committed only component which is this. If you want to go for this you can press f7 but if you utilize has multiple missiles it will give us this message it can go which one get an email one or get a value or two string because there are multiple drill down function. So, if you want to go get a domain x or get an image component at a breakpoint again here and press f8 So, it will come here with me on board. Just suppose the mouse here, if you didn't get any value, it means this is null. So, this is a problems a main is coming now, if it if it error, so the main component is null it means zero component in the email component is going to poverty is not binding to this variable.
So I will go to the binding as you can see it is null. So we have to bind this with Emir component. This is why is the image component is null and we receive this error. So now I add this here. This is if the mind to just terminate or resume or debug continue. So you will receive here's there, let's just refresh again okay this is rubbish again just fine and write this domain COMM And I will breach validate.
So, I will come here again it will take to the second step or if you add a breakpoint to drill down function it will go to this function email component was the mouse. So, once you put the mouse on your finds a value here, it means it gets the value now and it is not null okay. So if a if a to coordinate both the mouse over the mean, we will find the value is this domain will come. So, every step you will go, you should go and see, okay let us know until we get Damian, this ad domain.com let us run continue running and see the mail does not exist However, this domain is exist but I received here so I think we need to continue debugging so I will press for the date again I am here if it I don't want this anymore.
So I will press it to go to the next slide. As you can see image here test domain. So image This is this domain I need to go to is his image exists function. So I will press f7 to drill down inside the function. So it go here and it's sent email Buddha mouse overs image is just a minute. Okay if it if it if it get a connection, you can see the connection is coming correctly.
And if it was the most overly secure, you'll find a security statement city The neuron bullies will emit equal that's fine. Okay. Run. So, this shows a statement is sin SQL statement is selected emitted from in when we will equal this domain to okay. If it it doesn't enter to return it means this SELECT statement as a security statement is not exists is wrong, why it is wrong because here is a test is t Kavita and what are we received is it is small okay. So this is if it will continue if it if you want to continue out line by line, press f9 it will straight away continue.
Okay so now we know because of is a select statement is we can ignore If you want to ignore the uppercase or lowercase we can see to to maybe upper case here and here we can call our image like this. Okay? And it has to publication and run it again is a debug mode. Okay, so let's again try this to remain valid it should stop here. Now it is stopped here. Okay.
So I will go for f8 to get the next line and this line You can after you finish the line if you put the mouse over the variable you will find the value now you need to go for the is in a mean exists function you have to option press f7 or you can put a brick down here over this is it doesn't exist so that you will jump to the soil base now f7 to drill down to the function then I will continue line by line using f8 so if it is okay what is now selected statement is selected made formally with our even equal old operator okay the sun now which is cleared through so I will continue now running exists or you will find me the exists success if you want to now to test it without debugging you just to remove your breakpoint.
So I will remove this breakpoint, no breakpoint at all now and I will try to enter in your own game a graceful exit Email does not exist correct me visibility it is exist. So now, you can debug your code by entering a breakpoint and once the code is reached the combat reach to the breakpoint line it will stop. For example, if it is exist is I mean it exists, I want to stop here. So, I will bring a breakpoint here and once I press validate, it will come once it is coming in this it will stop and you can press f8 to jump line by line to know what exactly is available. Once it reached to this, it means this finished you can press f9 to continue. This is how you can debug your code in the gdb.
So, see you and you can see it