Announcement

Collapse
No announcement yet.

The way to debug unrealScript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    @Spoof
    Hey, tried yours `trace. Definitely helps. Good work.
    Thanks
    Regards

    Leave a comment:


  • replied
    I'm a little bit disappointed that no one mentioned UnrealScript IDE for Sublime Text 2 yet. It comes integrated with UnrealDebugger which is a very good debugger.
    Aside from that, I also use `log() to debug

    Leave a comment:


  • replied
    @Elvince that's OK.

    Leave a comment:


  • replied
    @SmallB,

    I was not trying to be a bodygard and they defend themself pretty well (I saw that in other threads^^). Sorry if I offend you, but that's was not my purpose.
    I may not have understand your question, but for me you were looking for a RealtimeDebugging. If so, I pointed you to the Programming forum at the top to find the IDE availables with this feature.
    In this thread , the author add a features called: "integrated debugging". I have not tested it, so it may be what you are looking for.
    You have this one claiming also to have debug feature.
    And the last one have debug feature in VS IDE.

    Out of this, as far as I know, there is only nfringe that propose this features.
    Now, as many people here wrote, they are working without realtime debug but just log. For this, I suggest you to read this as an enhancement of the default logger.

    if you have time, you can help enhancing the debug feature of one of those IDE, by implementing & managing the C++ interface that is required to do live debug with UDK. Or if you have a lot of time, you create your own langage support & debug feature in VS IDE like nfringe did (but that's might be a lot of work).

    Leave a comment:


  • replied
    @Spoof hey that is way you work. Mine is different - and valid and correct too.
    Apart from that I believe that tools are made to be used if they make my work easier. That's why I drive car to my office not bike nor do I walk even though I know that 15km walk or bicycle ride would be much healthier for me that just sitting in my car. But that's just me and even if the whole town would start to walk instead of drive I will still drive. Why? Because it is more convenient (for me), and if I need to exercize I do it when I decide and in time when it suits me not because others (who walk 15km everyday to work because it's healthy) tell me so

    Leave a comment:


  • replied
    Douglas Slocombe is a famous cinematographer who worked on the Indiana Jones movies with Spielberg. The primary 'debugging' tool of a photographer is his light meter, used to take exposure readings that help judge the contrast of the scene, and ultimately determine the need for fill lighting and camera exposure.

    Slocombe rarely used a light meter on those movies. He relied on his eyes and experience.

    A debugger is an essential tool when you first start out. It helps to visualise the synchronicity of program execution, the structure of a call stack, registers, etc. It's also indispensable to track down low-level issues when necessary.

    A debugger is purely logical, step by step. But good software engineering is as much about imagination as it is cold logic. If you apply a little imagination you can have your code do most of the debugging for you, leaving you with much less of a problem to solve - one that doesn't need a debugger.

    Leave a comment:


  • replied
    Well, your question was how do I do it - the answer was statically and with logging - defensive programming techniques mean I shouldn't have to do much to get to the bottom of my problem.

    Leave a comment:


  • replied
    @ambershee
    Hey, that's great. I do respect others and the way they work. For me coding without debugger is a nightmare and I am pretty certain that I would have hard time without. The point is that I would also expect others to respect my way of working. If you don't use debugger and you (not you personally but one) are happy with it, hey, that's cool. But if I want to use debugger because that's how I work, I would expect people to give me answer to my question instead of trying to force they way of working on me or preaching me. You see?
    But funny there are plenty of people (like elvince) who simply see people like me (people who do not agree with everything what's somebody else said, and actually have their own opinion) so back to the point , they see me as a someone who criticizes others, but not as someone who was criticized in first place and tried to defend himself.
    Anyway, I don't see for myself working without debugger. But that's me.
    As for people like Linus? Hey, I probably never will be in his league when programming is concerned, and probably will always need debugger.

    Leave a comment:


  • replied
    Originally posted by smallB View Post
    @ambershee I cannot agree with this. I was working in environments where there was no step-by-step debugging, and lack of it was really painful.
    Then I do think you really need to learn to work without one. The debugger is a useful tool, but it isn't something you should be relying on in your day-to-day work.

    Originally posted by smallB View Post
    So drop the IDE and use notepad then.
    For UnrealScript, I work with Notepad++ (for syntax highlighting and scope collapsing) and the UnrealFrontEnd (to compile via the command line without faffing around). I find Visual Studio pointlessly cumbersome for working with light scripting languages.

    Originally posted by smallB View Post
    I've never met anyone in my (professional) life who would program (code) and never used a debugger on a project.
    I've worked with plenty who only use it as a last resort or in specific cases. I would describe this as normal behaviour.

    I can introduce you to quite a few people who don't asides from the several in this thread; if you want a famous example, Linus Torvalds is known to avoid the debugger, and had this rant with regards to using one when developing the Linux kernel:
    http://linuxmafia.com/faq/Kernel/lin...rd-speech.html

    Stack Overflow has a discussion with people on both sides of the bracket - not many people advocated using the debugger outside of specific scenarios:
    http://stackoverflow.com/questions/1...ing-a-debugger

    These guys talk about it briefly and mention edge cases where you probably would go to the debugger:
    https://news.ycombinator.com/item?id=2123830

    ..and to round it off, Jeff Kotula says 'Debuggers are a crutch':
    http://jeffkotula.wordpress.com/2012...-are-a-crutch/

    Leave a comment:


  • replied
    @elvince would you mind and do not tell me what to do and how to behave? As far as I'm concern I am polite and I am simply having conversation/discussion with some people and we are exchanging arguments. That's all there is to it. They are pretty capable them self to argue, and don't need "bodyguards" to fight their cases. If anyone it is you who behaves in inappropriate manner and is attacking me just because I have different opinions to others and I exchange and discuss my point of view. Get a life man.

    Back on the topic, "Otherwise, it's nfringe." - no, you are wrong. Stop giving wrong/misleading advice/answers.

    Leave a comment:


  • replied
    @SmallB,

    Stop commenting others way of coding and look at the top of the programming forum to see all the IDE available. Some have debug functionalities and other don't. If I remember properly they is a plug-in on top of elipse that may handle this. Otherwise, it's nfringe.
    You are talking to some MVP that have a huge experience of Unreal. With time you are getting confortable with all the notion you must used, and it might be easy for them to write the script without runtime debug. In you situation, you might want to runtime debug to learn and then to implement your code.
    I think that a debugger in an appropriate IDE is a must have, but if people are successful and recognized for their work you must accept that and don't argue against them that's not the "professional" way to work. You should not fight against them because I bet that you may need their advice sooner and you will apreciate their professional skills on UDK! They are spending a lot of time answering on the forum and they solved a lot problem that people faced.

    Leave a comment:


  • replied
    @ambershee I cannot agree with this. I was working in environments where there was no step-by-step debugging, and lack of it was really painful.

    From this same page, comments section:

    " Kids, don't listen to this cultist. A debugger is an extremely useful and effective tool for identifying problems."

    I genuinely am stumped when I hear someone claiming debugger is a crutch when programming is concerned. So drop the IDE and use notepad then. Don't use logs too. Use pen and paper. It is simply ridiculous and I refuse to even consider it as a normal and correct way.

    @spoof congratulations on coding 'skillz' then. I've never met anyone in my (professional) life who would program (code) and never used a debugger on a project.

    Leave a comment:


  • replied
    Originally posted by smallB View Post
    "I do not want to offend you nor anyone else, but when someone tells me that they didn't use debugger for almost 10 years (while doing serious programming) I simply come to conclusion as the one above.
    No offense taken.

    FYI I've been a programmer for over 25 years; I began writing hand-coded assembly language on 8-bit machines, moved on to 16-bit assembly on the Amiga (DevPac, Snasm), then to C and C++ on the PC, and developed my own game engine up until 2006. My UDK projects use a custom toolset, built from the ground up in UnrealScript, so I think I qualify for 'complicated enough tasks'.

    If I were to encounter a low-level issue in C++ (memory manager, driver, etc.) then I would turn to a debugger. But that's just not necessary in most high level scripting languages like UnrealScript.

    Back on topic, I'm sure nFringe isn't the only IDE with debugging support. A new one was posted just this week claiming to have it.

    Leave a comment:


  • replied
    I've been working with Unreal for six-seven years now - when I first got started, there was no step-through debugging - people managed to work that way just fine before it started being introduced. Unrealscript is a fairly simple scripting language; good defensive programming and debug-logging practices should catch the majority of issues before you even need to consider a debugger - it's not like you can accidentally splat over a memory address from another thread or any other similar horror scenario.

    Step through debugging is a useful tool, but you sound like you're using it as a crutch, which will only slow you down and prevent you really getting to grips with your problems. If you can't debug your own work without it in an environment as simple as UnrealScript, I'd say you need to reevaluate your debugging habits. There's a pretty good anecdote by Kas Thomas over on AssertTrue() to this effect, and I'm sure it would take literally seconds to find many similar articles:

    Years ago, when I was first learning to program, I ran into a problem with some code I was writing, and I asked my mentor (an extraordinarily gifted coder) for some help. He listened as I described the problem. I told him all the things I had tried so far. At that time, I was quite enamored of the Think C development environment for the Mac. It had a fine step-thru debugger, which I was quite reliant on.

    My mentor suggested a couple more approaches to try (and when I tried them, they worked, of course). Then he made a remark that has stayed with me ever since.

    "I try to stay away from debuggers," he said. "A debugger is a crutch. You're better off without it."

    I was speechless with astonishment. Here was someone who wrote massive quantities of Pascal and assembly for a wide variety of platforms -- and he never used a debugger! I couldn't have been more shocked if he told me he had perfected cold fusion.

    "If you get in the habit of using a debugger," my mentor pointed out, "you'll get lazy. A certain part of your brain shuts off, because you expect the debugger to help you find the bug. But in reality, you wrote the bug, and you should be able to find it."

    Still stunned, I asked: "What do you do when you have a really nasty bug?"

    He said something I'll never forget. "I make the machine tell me where it is."

    Make the machine tell you where the bug is. What a wonderful piece of advice. It's the essence of troubleshooting, whether you're trying to fix a car that won't start, trace an electrical fault, or debug a piece of software.

    My friend (who did a lot of "realtime" programming in assembly, among other things) pointed out to me that there are many programming scenarios in which it's impossible to run a debugger anyway.

    I took my mentor's advice and stopped using a step-through debugger. The only real debugger I continued to use (at that time) was Macsbug, which I occasionally invoked in order to inspect the heap or see what was going on in a stack frame.

    Sure enough, I found that once I stopped using a step-thru debugger, my coding (and troubleshooting) skills improved rapidly. I spent less time in "endless loops" (fruitless troubleshooting sessions) and got to the source of problems quicker. I learned a lot about my own bad coding habits and developed a renewed appreciation for the importance of understanding a language at a level deeper than surface-syntax.

    To this day, I avoid step-thru debugging, and find myself better off for it.

    If you do a lot of step-thru debugging, try this as an exercise. For the next month, don't use a debugger. See if you can walk without crutches for a change. I'm betting you'll lose the limp in no time.
    Source: http://asserttrue.blogspot.de/2009/0...-debugger.html


    Coincidentally, I've also worked in C++ environments where step-through debugging and even logging strings of any length is a complete impossibility - what would you do then?

    Leave a comment:


  • replied
    "It works for me. Log file + intuition. I haven't used a debugger for almost a decade." - because you do not program complicated enough tasks. If you have had done so, then simply put programming without debugger is impossible. As simple as that. During my over 10 years spent as a C++ programmer I never ever heard of anyone who do their job (programmer's job that is) without debugger - it is simply not happening nowhere in the world. But if you doodle and change line here and there and add line or two then sure log is plenty. For real programming you simply have to use debugger (and other tools like test cases/scenarios etc).

    I do not want to offend you nor anyone else, but when someone tells me that they didn't use debugger for almost 10 years (while doing serious programming) I simply come to conclusion as the one above.

    Leave a comment:

Working...
X