1
I have the following function in C#
and in JAVASCRIPT
when I place a stop point (F9) on the function in c#
it works normally, but the debugger
No, he won’t stop, I’m doing something wrong?
I’m using Visual Studio 2017
@functions{
public string obterDado2()
{
string Validador = TipoPecaController.validar2;
return Validador;
}
public string alterar()
{
TipoPecaController.validar2 = "";
return TipoPecaController.validar2;
}
}
<script type="text/javascript">
var vd = "";
window.onload = function() {
debugger;
vd = @obterDado2();
debugger;
if (vd == "True") {
alertify.alert("Aviso", "Esse Tipo de Peça já existe, tente cadastrar um diferente", function () {
alertify.message('OK');
});
vd = @alterar();
}
else if (vd == "Trues") {
alertify.alert("Aviso", "Essa sigla já existe, tente cadastrar uma sigla diferente", function () {
alertify.message('OK');
});
vd = @alterar();
}
}
</script>
you’re giving
F12
in the browser?– rLinhares
Well, I’m a beginner and I didn’t know it was necessary the F12, I’ll test, thank you
– Jeff Henrique
This is for if you want to debug without ide.. I don’t know if that’s your case
– rLinhares
I’d like it to go through the ide, but thanks, I’ll get to learn about debugging by the browser
– Jeff Henrique
What kind of VS project are you talking about?
– Leandro Angelo
I don’t know exactly understood the question, but I work with Asp.net
– Jeff Henrique
It seems to me Razor Pages, the question is whether you are talking about MVC, Razor Pages, Web Forms, Blazor or other structure.
– Leandro Angelo
Well, I don’t know if I’m going to answer this question correctly, as I said I’m a beginner, but it must be Web Forms, because I’m working with forms, I’m not in the company anymore, but I’m going to post the code all tomorrow when I get there
– Jeff Henrique
If you want to debug javascript by VS 2017 you have to use/navigate that page that it opens automatically when you press F5
– Aesir