Connect with us

Microsoft

Improved authoring and debugging experiences in Microsoft Edge DevTools and Visual Studio Code

As web developers we spend a lot of time authoring our code in an editing environment. We then jump over to the browser to use the in-built developer tools to debug and tweak the product UI. The problem with this is that results of the tweaking and debugging aren’t reflected in the source code.  In…

Published

on

As web developers we spend a lot of time authoring our code in an editing environment. We then jump over to the browser to use the in-built developer tools to debug and tweak the product UI. The problem with this is that results of the tweaking and debugging aren’t reflected in the source code.  In Microsoft Edge, we are currently working on a couple of solutions that are open for discussion, and we’d love your feedback on them

If you prefer to watch a video instead of reading, here is a three minute introduction:


The current problem with tweaks and changes in Developer Tools

Today, browser DevTools provide highly sophisticated visual tools that teach you – for example – CSS syntax whilst you use them. These tools change things in a visual manner. For example, you can click the “Flexbox” icon next to any CSS flexbox property and you get a popup giving you a preview of the outcome of that style change.

This is an excellent debugging experience and prevents you from having to look up CSS syntax all the time. However, there is a disconnect, as the code displayed in these debugging workflows isn’t what you wrote in your code editor.

The Styles editor works by showing only a partial view of the code for the current element selected in the browser. You don’t know where and how that code fits into the rest of your CSS on your webpage. While you can scroll to view the rest of the code, wouldn’t it be better to also see the original CSS file?

You can access that one by clicking the links to the CSS file itself, which brings you to Sources Tool and away from the Styles editor.

This one is an editor embedded into the browser developer tools that was nifty when they came out but doesn’t shine in comparison with what we expect from an editor these days. Unless you undock the tools and use them in an own window, you also don’t have enough screen estate for a convenient editing experience.

Whether you use the visual tools to tweak your CSS, or the Sources editor, one problem remains: once you changed a lot of things and you arrived at the desired outcome, how do you get these changes back into your source code?

Did you know that there is a Changes tool?

Browser Developer Tools have a feature that helps with this called Changes that doesn’t get much use and is largely unknown. You can access it from the command menu or the context menu and it shows you a diff view of all the files you changed in this session. You can use this tool to copy and paste the changes back to your source files.

Firefox uses a slightly different approach of a changes tool that updates live with changes you make. It also creates a CSS file for you to copy and paste that has comments explaining which files to paste these changes back into and what was removed or added.

Whilst this is a good step in the right direction, it requires an extra step to copy and paste the code back into your editor.

An improved Workspace flow including Visual Studio CodeWorkspaces in Chromium Developer Tools have been around for a long time but don’t see that much use. That’s why we wanted to make it more obvious that you can have live syncing of changes between browser DevTools and a code editor. We also realised that the editor in the Sources tool isn’t what people want to use.

What if you could have the convenience of the editor you already use and the benefits of live changes to files of Workspaces?

Starting with version 96 of Microsoft Edge, you can find a new experiment in DevTools called “Open source files in Visual Studio Code”.

Once you turned this one on and restarted developer tools, navigating to a file on your hard drive or a local server address like localhost or 127.0.0.1 will give you a prompt that asks you to identify the root folder of this file. You can also opt out for a session or never see this option again.

Once you pick a folder, the browser asks you for permission to get access to that folder – much like you had to when using Workspaces in the Sources tool.

When you now do any change in the Styles pane, the file changes on disk. The difference is that when you have Visual Studio Code as your editor on the computer, clicking the links to the files will open them in this editor instead of the one in the Sources tool. You stay in the environment you are used to with all the customizations and extensions you added to it.

This is great as your CSS changes are permanent now. The problem is though that they may be too intrusive. Any change in the Styles tool like changing a size by one unit will result in the file on your hard drive changing. If you use any live reload server solution or even scripts that watch a folder and trigger a build process, this can get messy quickly.

CSS mirror editing

In the latest version of the Edge DevTools for Visual Studio Code extension we introduced a different way to close the authoring/debugging loop called “CSS Mirror Editing”. If you want, you can watch this 40 second video introduction.


If you enable this feature, changes made in the Styles tool also affect the source code, but the file remains unchanged until you save it in Visual Studio Code. You get the benefit of not losing your changes and you keep full control over the files on the hard drive.

If you use version control, you can see all the changes you made as a diff view once you saved the file. This gives you all the convenience of the Workspaces workflow with fewer changes to the files.

What should we do to make this experience better?

It seems we have all the right components in place to give developers and end-to-end authoring and debugging experience. We would love to know what you think of these approaches and which one you prefer.

If you have any feedback, please contact the Edge DevTools team on Twitter at @EdgeDevTools, comment on this issue on GitHub about CSS Mirror Editing or use the Feedback tool built into the DevTools in the browser.

– Chris Heilmann, Principal Program Manager, Microsoft Edge

Source

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published.

Microsoft

Babylon.js 5.0: News Tools – Part 2

We are artists, developers, creators, and dreamers and we want to make it as simple as possible to enable everyone to bring their ideas to life. With this new version of Babylon.js, we set out to make it even easier to develop thanks to a suite of new and exciting tools. Animation Curve Editor Creating and…

Published

on

By

We are artists, developers, creators, and dreamers and we want to make it as simple as possible to enable everyone to bring their ideas to life. With this new version of Babylon.js, we set out to make it even easier to develop thanks to a suite of new and exciting tools.

Animation Curve Editor

Creating and modifying animation data in a rendering engine can be complicated and verbose, but not anymore! Babylon.js 5.0 adds a built-in Animation Curve Editor (ACE), making it incredibly easy to create and modify animation data directly in your Babylon scene. As with all Babylon.js Platform tools, you can also save your animation data to the Babylon.js Snippet Server and load it back into your Babylon.js scene with one single line of code!

See it in action here: Play with the Animation Curve Editor

Learn more: Animation Curve Editor Documentation

Performance Profiler

Performance is one of the most important things to keep in mind as you create advanced interactive 3D experiences. After all, you don’t want to create an awesome experience that only runs on the most high-end graphics cards, right? You want to create something that EVERYONE can enjoy, and this means keeping track of and optimizing the performance of your scene. Babylon.js 5.0 makes performance debugging and management a breeze with the introduction of the new Performance Profiler. This handy tool allows you to see a real time graph of key performance indicators of your scene, all hooked up live! Make a change, see the impact on perf. It’s really that simple!

See it in action here: Performance Profiler Demo

Learn more: Performance Profiler Documentation

GUI Editor Beta

Babylon.js has a powerful GUI system that offers countless widgets, controls, and properties to help you create rich GUIs. With Babylon.js 5.0 that powerful system becomes far simpler to use with the introduction of the GUI Editor Beta. While still in active development, the GUI Editor Beta is a rich and modern tool, allowing you to create the perfect GUI with a simple and intuitive drag-and-drop interface. Say goodbye to thousands of lines of GUI code and hello to a world of design with the GUI Editor Beta and loading your creations with a single line of code!

See it in action here: GUI Editor Beta Demo

Try it out for yourself: GUI Editor

Learn more: GUI Editor Beta Documentation

New Node Material Nodes

The Node Material Editor is one of the most advanced tools available in the Babylon Platform. One simple UI that helps you generate stunning GLSL shaders with ease. With Babylon.js 5.0 the Node Material gets even better with the introduction of several powerful new nodes!

Check out the new nodes:

Learn More: Node Material Documentation

Asset Librarian

The Babylon.js Platform offers a large library of free Creative Commons 0 assets available for you to use in your Babylon.js scenes, completely for free. With Babylon.js 5.0, accessing these assets is easier and faster than ever! The new Asset Librarian brings a new Assets namespace that you can use in your projects to easily access the 200+ free assets to make your Babylon.js scenes soar.

Try it out: Asset Librarian Demo

Learn More: Asset Librarian Documentation

Dev Stories Documentation

Babylon.js 5.0 adds a whole new category of documentation called “Dev Stories.” These new tutorials are designed to walk you, step-by-step, through some common scenarios that many Babylon.js developers ask about. From setting up a Babylon.js project quickly, adding interactive 3D elements to your e-commerce site, to deploying your Babylon.js project to a Native Application, “Dev Stories” are rich, deep, detailed tutorials aimed at helping you take your project from idea to reality!

Check It Out: Dev Stories!

“Going The Distance With Babylon.js” A New Book               

We are also incredibly excited to share that alongside Babylon.js 5.0, community member and talented author Josh Elster has written an entirely new book about Babylon.js 5.0. Published by Packt Publishing, “Going The Distance With Babylon.js” is written from the mindset of taking you through the entire development process of building a game with Babylon.js from the ground up. We are thrilled to partner with Josh and Packt on this book and think it’ll be a great addition to your library and accelerate your Babylon.js learning journey.

Pick Up Your Copy Here: Babylon.js 5.0: The Book

Beside the tooling, there are also a ton of new features in the engine itself. Check out part three to learn more about the exciting new improvements with Babylon.js 5.0.

Source

Continue Reading

Microsoft

How Windows speech-to-text and other tools can help address educational inequity

Graham, a 12-year-old boy who lives in Kansas, has a neurological condition that renders him unable to read or write. But, thanks to Windows speech-to-text, Immersive Reader and other tools, he’s been able to look forward to the future. He now aces book reports and makes business cards for his lawn-mowing service thanks to those…

Published

on

By

Graham, a 12-year-old boy who lives in Kansas, has a neurological condition that renders him unable to read or write. But, thanks to Windows speech-to-text, Immersive Reader and other tools, he’s been able to look forward to the future. He now aces book reports and makes business cards for his lawn-mowing service thanks to those tools. He dreams of being a doctor.

Features like these can help address inequity in schools, empowering students like Graham to find their voices and be game changers.

See the video below. To learn more about Graham and some of the ways teachers are using technology to help address inequity in the classroom, visit Microsoft Stories.




Source

Continue Reading

Microsoft

Using Azure and Windows 11, IRZ consulting company helps farmers save water and power

Water is one of the most precious resources on Earth. And as someone whose family has been farming for generations, Fred Ziari has made it his life’s work to help growers be more efficient with this vital element for their crops, as well as the energy it takes to distribute it. Ziari is the CEO…

Published

on

By

Water is one of the most precious resources on Earth. And as someone whose family has been farming for generations, Fred Ziari has made it his life’s work to help growers be more efficient with this vital element for their crops, as well as the energy it takes to distribute it.

Ziari is the CEO of IRZ Engineering & Consulting, which provides services to agriculture communities around the world. The company is based in eastern Oregon, which he says is 95% efficient in its water use, vs. about 40% globally.

Water management is directly tied to crop productivity. IRZ offers water management services for large scale farms (100 acres or more), using water sensors and Microsoft Azure cloud services. This Internet of Things (IoT) solution links the internet connected sensors to the cloud. Azure SQL Server manages the incoming data and then IRZ uses custom apps to deliver that information to farmers, leading to decisions that help them save them 15-20% in water and power usage annually, which translates to millions of dollars. Windows 11 PCs and Microsoft 365 are must-haves for IRZ to smoothly conduct its daily business.

By reducing both water and energy in irrigated farming, IRZ customers conserve over 10 billion gallons of water every year.


Born in Northern Iran on a farm along the Caspian Sea, Ziari says generations of his family grew about 30 different types of crops, so agriculture has always been a big part of his life.

“Growing up in a family farm, I always believed that the technology of agriculture was more important to me and more interesting than the farming itself,” Ziari says. “I felt that by using water more efficiently, you can increase productivity by many, many fold.”

Fifty years ago, he came to the U.S. when he was 18.

He went to Texas A&M University for his undergrad and graduate studies before joining the faculty at Washington State University as a researcher in water management, specializing in irrigated agriculture.

Fred Ziari of IRZ

Irrigation and rainfall are the two sources most farms use to water their crops. Irrigated agriculture has become more important since it’s not so dependent on the environment and changing climate conditions to assure production and yield. But that means farmers need to use water more efficiently.

“If you put too much water to the crop, you are drowning it because the roots need oxygen. If you put too much water, you’re suffocating them,” Ziari says. “If you can put just the right amount of water, your productivity increases substantially.”

Soil moisture sensor up-close, in a potato field

In 1982, he moved to Oregon. Two years after that, he started IRZ engineering consulting, when he was 30.

Ziari got some of his best business advice from his grandfather. When he was a teen, his grandfather told him to be brave, take risks and create something, and good things would happen. As an entrepreneur, Ziari says that courage is a must. He also believes in a purposeful life – helping others, serving communities.

“You can only manage what you measure, so we rely tremendously on field sensors and climate input technologies – as well as modeling – using software to achieve our water management goals,” Ziari says. “Our company has been using Azure cloud services to provide near real time information and data to the farmers in multiple states: Oregon, Washington, Idaho and around the globe. So that has been a game changer for us on how we provide information and data to farmers – and how quickly they’re able to make irrigation decisions based on that data.”

Tim Berk of IRZ

Before Azure, they had to send a soil scientist and agricultural engineer to the farms and they would measure soil moisture, write it down on paper and bring it to the office. And then another person input the data. IRZ’s technical team installs real-time moisture sensors that go up to a meter deep and report what is happening with soil moisture and how much of the crop is taking water out of the soil every 15 minutes. They’re also tapping into weather stations and using proprietary software to forecast crop water use. It’s a massive amount of data – that’s now connected to Azure. Then apps forward that information to farmers on their desktops, laptops and mobile devices so they can decide when and how much to irrigate.

At the IRZ offices, engineers rely on Windows 11 and Microsoft 365 daily, such as using the centered task bar, widgets and a simplified start menu; as well as PowerPoint or Excel for calculations needed for sophisticated modeling or presenting ideas to clients.

Telemetry unit with the rain/irrigation gauge (black object) on the left in a potato field, where the crop is at a later stage of growth

Tim Berk, who’s been with IRZ for about 20 years, is the company’s IT manager. He says it’s been a long road to where they are with technology.

Within their customer base, the acceptance of technology has increased. In earlier years, Berk says it was difficult to encourage a grower or one of their customers to go online to get information – whether that was a weather report or a report IRZ published. In more recent years, as the internet has become standard, those growers have embraced web-based technologies.

IRZ chose Affirma as its technology partner about seven years ago to help them in other areas.

“Affirma allows us to do things that we can’t do ourselves,” Berk says. “They’ve got a lot of talent to draw from, whether it’s a data architect, a web developer or UI/graphics arts designer. Our customers also benefit from our relationship with Affirma. They help us bring our ideas to life and in their best form possible. Our expertise is in irrigation, consulting and engineering. With Affirma, we have a deep bench with talent and data architecture, software engineering, user interface design.”

Berk started at IRZ doing field work, then moved over to his current role in technology, where he’s been the majority of his time there.

Soil moisture sensor installed in a field

“Water management is important for a couple of reasons,” he says. “It allows growers to better manage costs associated with irrigating their crops and fields. Secondly, it’s important for the environment to use water wisely. It’s good for the environment, it’s good for the planet.”

In the past, IRZ hosted its own website and infrastructure, which was very expensive and difficult to implement. With Azure, they have all those things available to them without having to manage it themselves. Being cloud-based helps IRZ with redundancy and geo-located backups of services – something Berk says puts a small business on the same level as big business.

As a result, they’re giving farmers and growers the biggest benefit of all: time.

Traditionally, a farmer would have to visit his field multiple times a week, even every day. With IRZ’s sensors in the field, farmers can have the confidence to take time off and still be able to monitor their fields in near real-time.

Berk frames the company’s services to growers as a decision support system, starting with sensors in the field – moisture in the soil or applied irrigation – that transmit that data via satellite or by cell modems.

From there, IRZ imports that data into its system where it’s stored in Azure SQL databases, and then a number of processes run within a web application. And then it’s available to IRZ customers in near real-time in the form of reports on either a tablet, smartphone, a PC or a web browser.

During the summer growing season, fields can get dry – sometimes all at the same time. But farmers can’t add irrigation to the entire field at the same time due to the nature of the way the irrigation machines work. They have to plan ahead.

Source

Continue Reading

Trending

Copyright © 2021 Today's Digital.